add api_version to azure_openai_complete_if_cache
This commit is contained in:
parent
9b92d425f6
commit
137315ec18
1 changed files with 3 additions and 0 deletions
|
|
@ -92,12 +92,15 @@ async def azure_openai_complete_if_cache(
|
|||
history_messages=[],
|
||||
base_url=None,
|
||||
api_key=None,
|
||||
api_version=None,
|
||||
**kwargs,
|
||||
):
|
||||
if api_key:
|
||||
os.environ["AZURE_OPENAI_API_KEY"] = api_key
|
||||
if base_url:
|
||||
os.environ["AZURE_OPENAI_ENDPOINT"] = base_url
|
||||
if api_version:
|
||||
os.environ["AZURE_OPENAI_API_VERSION"] = api_version
|
||||
|
||||
openai_async_client = AsyncAzureOpenAI(
|
||||
azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT"),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue