Skip to content

Commit 2442d01

Browse files
committed
Provide default version
1 parent ed730fd commit 2442d01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/fastapi_app/openai_clients.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ async def create_openai_chat_client(
1313
openai_chat_client: openai.AsyncAzureOpenAI | openai.AsyncOpenAI
1414
OPENAI_CHAT_HOST = os.getenv("OPENAI_CHAT_HOST")
1515
if OPENAI_CHAT_HOST == "azure":
16-
api_version = os.environ["AZURE_OPENAI_VERSION"]
16+
api_version = os.environ["AZURE_OPENAI_VERSION"] or "2024-03-01-preview"
1717
azure_endpoint = os.environ["AZURE_OPENAI_ENDPOINT"]
1818
azure_deployment = os.environ["AZURE_OPENAI_CHAT_DEPLOYMENT"]
1919
if api_key := os.getenv("AZURE_OPENAI_KEY"):

0 commit comments

Comments
 (0)