mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-12-24 13:22:21 +00:00
add api_version to azure_openai_complete_if_cache
This commit is contained in:
parent
9b92d425f6
commit
137315ec18
@ -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…
x
Reference in New Issue
Block a user