Fix linting
This commit is contained in:
parent
b709f8f869
commit
b46c152306
1 changed files with 11 additions and 7 deletions
|
|
@ -751,7 +751,7 @@ async def azure_openai_complete_if_cache(
|
||||||
**kwargs,
|
**kwargs,
|
||||||
):
|
):
|
||||||
"""Azure OpenAI completion wrapper function.
|
"""Azure OpenAI completion wrapper function.
|
||||||
|
|
||||||
This function provides backward compatibility by wrapping the unified
|
This function provides backward compatibility by wrapping the unified
|
||||||
openai_complete_if_cache implementation with Azure-specific parameter handling.
|
openai_complete_if_cache implementation with Azure-specific parameter handling.
|
||||||
"""
|
"""
|
||||||
|
|
@ -768,10 +768,10 @@ async def azure_openai_complete_if_cache(
|
||||||
or os.getenv("AZURE_OPENAI_API_VERSION")
|
or os.getenv("AZURE_OPENAI_API_VERSION")
|
||||||
or os.getenv("OPENAI_API_VERSION")
|
or os.getenv("OPENAI_API_VERSION")
|
||||||
)
|
)
|
||||||
|
|
||||||
# Pop timeout from kwargs if present (will be handled by openai_complete_if_cache)
|
# Pop timeout from kwargs if present (will be handled by openai_complete_if_cache)
|
||||||
timeout = kwargs.pop("timeout", None)
|
timeout = kwargs.pop("timeout", None)
|
||||||
|
|
||||||
# Call the unified implementation with Azure-specific parameters
|
# Call the unified implementation with Azure-specific parameters
|
||||||
return await openai_complete_if_cache(
|
return await openai_complete_if_cache(
|
||||||
model=model,
|
model=model,
|
||||||
|
|
@ -791,10 +791,14 @@ async def azure_openai_complete_if_cache(
|
||||||
|
|
||||||
|
|
||||||
async def azure_openai_complete(
|
async def azure_openai_complete(
|
||||||
prompt, system_prompt=None, history_messages=None, keyword_extraction=False, **kwargs
|
prompt,
|
||||||
|
system_prompt=None,
|
||||||
|
history_messages=None,
|
||||||
|
keyword_extraction=False,
|
||||||
|
**kwargs,
|
||||||
) -> str:
|
) -> str:
|
||||||
"""Azure OpenAI complete wrapper function.
|
"""Azure OpenAI complete wrapper function.
|
||||||
|
|
||||||
Provides backward compatibility for azure_openai_complete calls.
|
Provides backward compatibility for azure_openai_complete calls.
|
||||||
"""
|
"""
|
||||||
if history_messages is None:
|
if history_messages is None:
|
||||||
|
|
@ -826,7 +830,7 @@ async def azure_openai_embed(
|
||||||
api_version: str | None = None,
|
api_version: str | None = None,
|
||||||
) -> np.ndarray:
|
) -> np.ndarray:
|
||||||
"""Azure OpenAI embedding wrapper function.
|
"""Azure OpenAI embedding wrapper function.
|
||||||
|
|
||||||
This function provides backward compatibility by wrapping the unified
|
This function provides backward compatibility by wrapping the unified
|
||||||
openai_embed implementation with Azure-specific parameter handling.
|
openai_embed implementation with Azure-specific parameter handling.
|
||||||
"""
|
"""
|
||||||
|
|
@ -851,7 +855,7 @@ async def azure_openai_embed(
|
||||||
or os.getenv("AZURE_EMBEDDING_API_VERSION")
|
or os.getenv("AZURE_EMBEDDING_API_VERSION")
|
||||||
or os.getenv("OPENAI_API_VERSION")
|
or os.getenv("OPENAI_API_VERSION")
|
||||||
)
|
)
|
||||||
|
|
||||||
# Call the unified implementation with Azure-specific parameters
|
# Call the unified implementation with Azure-specific parameters
|
||||||
return await openai_embed(
|
return await openai_embed(
|
||||||
texts=texts,
|
texts=texts,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue