Skip to content

Commit f6a0eee

Browse files
authored
Merge pull request #18 from Azure-Samples/versionmodel
Change API version and name of app variable
2 parents e4bb5c4 + 4f4cadd commit f6a0eee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/quartapp/chat.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ async def configure_openai():
3535
bp.openai_client = AsyncAzureOpenAI(
3636
azure_endpoint=os.environ["AZURE_INFERENCE_ENDPOINT"],
3737
azure_ad_token_provider=openai_token_provider,
38-
api_version="2025-04-01-preview", # temporary
38+
api_version="2024-10-21",
3939
)
4040

4141
# Set the model name to the Azure OpenAI model deployment name
42-
bp.openai_model = os.getenv("AZURE_DEEPSEEK_DEPLOYMENT")
42+
bp.model_deployment_name = os.getenv("AZURE_DEEPSEEK_DEPLOYMENT")
4343

4444

4545
@bp.after_app_serving
@@ -65,7 +65,7 @@ async def response_stream():
6565

6666
chat_coroutine = bp.openai_client.chat.completions.create(
6767
# Azure Open AI takes the deployment name as the model name
68-
model=bp.openai_model,
68+
model=bp.model_deployment_name,
6969
messages=all_messages,
7070
stream=True,
7171
)

0 commit comments

Comments
 (0)