Skip to content

Commit e19ec61

Browse files
committed
Fix version output
1 parent c7258af commit e19ec61

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

infra/main.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ output OPENAI_EMBED_HOST string = openAIEmbedHost
447447
output AZURE_OPENAI_ENDPOINT string = !empty(azureOpenAIEndpoint)
448448
? azureOpenAIEndpoint
449449
: (deployAzureOpenAI ? openAI.outputs.endpoint : '')
450-
output AZURE_OPENAI_VERSION string = openAIEmbedHost == 'chat' ? azureOpenAIAPIVersion : ''
450+
output AZURE_OPENAI_VERSION string = azureOpenAIAPIVersion
451451
output AZURE_OPENAI_CHAT_DEPLOYMENT string = deployAzureOpenAI ? chatDeploymentName : ''
452452
output AZURE_OPENAI_CHAT_DEPLOYMENT_VERSION string = deployAzureOpenAI ? chatDeploymentVersion : ''
453453
output AZURE_OPENAI_CHAT_DEPLOYMENT_CAPACITY int = deployAzureOpenAI ? chatDeploymentCapacity : 0

src/backend/fastapi_app/openai_clients.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ async def create_openai_embed_client(
6262
openai_embed_client: openai.AsyncAzureOpenAI | openai.AsyncOpenAI
6363
OPENAI_EMBED_HOST = os.getenv("OPENAI_EMBED_HOST")
6464
if OPENAI_EMBED_HOST == "azure":
65-
api_version = os.environ["AZURE_OPENAI_VERSION"]
65+
api_version = os.environ["AZURE_OPENAI_VERSION"] or "2024-03-01-preview"
6666
azure_endpoint = os.environ["AZURE_OPENAI_ENDPOINT"]
6767
azure_deployment = os.environ["AZURE_OPENAI_EMBED_DEPLOYMENT"]
6868
if api_key := os.getenv("AZURE_OPENAI_KEY"):

0 commit comments

Comments
 (0)