Skip to content

Commit 8fca481

Browse files
fix: Updates to change the Azure OpenAI model from gpt-35-turbo to gpt-4o (#1665)
1 parent 7025c6e commit 8fca481

File tree

13 files changed

+206
-206
lines changed

13 files changed

+206
-206
lines changed

.env.sample

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ AZURE_SEARCH_DATASOURCE_NAME=
2222
# Azure OpenAI for generating the answer and computing the embedding of the documents
2323
AZURE_OPENAI_RESOURCE=
2424
AZURE_OPENAI_API_KEY=
25-
AZURE_OPENAI_MODEL=gpt-35-turbo
26-
AZURE_OPENAI_MODEL_NAME=gpt-35-turbo
25+
AZURE_OPENAI_MODEL=gpt-4o
26+
AZURE_OPENAI_MODEL_NAME=gpt-4o
2727
AZURE_OPENAI_EMBEDDING_MODEL=text-embedding-ada-002
2828
AZURE_OPENAI_TEMPERATURE=0
2929
AZURE_OPENAI_TOP_P=1.0

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ Select either "PostgreSQL" or "Cosmos DB":
194194

195195
When Deployment is complete, follow steps in [Set Up Authentication in Azure App Service](./docs/azure_app_service_auth_setup.md) to add app authentication to your web app running on Azure App Service
196196

197-
**Note**: The default configuration deploys an OpenAI Model "gpt-35-turbo" with version 0613. However, not all
198-
locations support this version. If you're deploying to a location that doesn't support version 0613, you'll need to
197+
**Note**: The default configuration deploys an OpenAI Model "gpt-4o" with version 2024-05-13. However, not all
198+
locations support this version. If you're deploying to a location that doesn't support version 2024-05-13, you'll need to
199199
switch to a lower version. To find out which versions are supported in different regions, visit the
200-
[GPT-35 Turbo Model Availability](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#gpt-35-turbo-model-availability) page.
200+
[GPT-4o Model Availability](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#global-standard-model-availability) page.
201201

202202
### Testing the deployment
203203
1. Navigate to the admin site, where you can upload documents. It will be located at:

code/backend/batch/utilities/helpers/env_helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ def __load_config(self, **kwargs) -> None:
174174
else:
175175
# Otherwise, fallback to individual environment variables
176176
self.AZURE_OPENAI_MODEL = os.getenv(
177-
"AZURE_OPENAI_MODEL", "gpt-35-turbo-16k"
177+
"AZURE_OPENAI_MODEL", "gpt-4o"
178178
)
179179
self.AZURE_OPENAI_MODEL_NAME = os.getenv(
180-
"AZURE_OPENAI_MODEL_NAME", "gpt-35-turbo-16k"
180+
"AZURE_OPENAI_MODEL_NAME", "gpt-4o"
181181
)
182182

183183
self.AZURE_OPENAI_VISION_MODEL = os.getenv("AZURE_OPENAI_VISION_MODEL", "gpt-4")

code/tests/functional/tests/backend_api/default/test_conversation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def completions_mocking(httpserver: HTTPServer, app_config: AppConfig):
6565
"id": "chatcmpl-6v7mkQj980V1yBec6ETrKPRqFjNw9",
6666
"object": "chat.completion",
6767
"created": 1679072642,
68-
"model": "gpt-35-turbo",
68+
"model": "gpt-4o",
6969
"usage": {
7070
"prompt_tokens": 40,
7171
"completion_tokens": 50,

code/tests/functional/tests/backend_api/default/test_post_prompt_tool.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def completions_mocking(httpserver: HTTPServer, app_config: AppConfig):
100100
"id": "chatcmpl-6v7mkQj980V1yBec6ETrKPRqFjNw9",
101101
"object": "chat.completion",
102102
"created": 1679072642,
103-
"model": "gpt-35-turbo",
103+
"model": "gpt-4o",
104104
"usage": {
105105
"prompt_tokens": 40,
106106
"completion_tokens": 50,
@@ -132,7 +132,7 @@ def test_post_responds_successfully_when_not_filtered(
132132
"id": "chatcmpl-6v7mkQj980V1yBec6ETrKPRqFjNw9",
133133
"object": "chat.completion",
134134
"created": 1679072642,
135-
"model": "gpt-35-turbo",
135+
"model": "gpt-4o",
136136
"usage": {
137137
"prompt_tokens": 40,
138138
"completion_tokens": 50,
@@ -193,7 +193,7 @@ def test_post_responds_successfully_when_filtered(
193193
"id": "chatcmpl-6v7mkQj980V1yBec6ETrKPRqFjNw9",
194194
"object": "chat.completion",
195195
"created": 1679072642,
196-
"model": "gpt-35-turbo",
196+
"model": "gpt-4o",
197197
"usage": {
198198
"prompt_tokens": 40,
199199
"completion_tokens": 50,
@@ -254,7 +254,7 @@ def test_post_makes_correct_call_to_openai_from_post_prompt_tool(
254254
"id": "chatcmpl-6v7mkQj980V1yBec6ETrKPRqFjNw9",
255255
"object": "chat.completion",
256256
"created": 1679072642,
257-
"model": "gpt-35-turbo",
257+
"model": "gpt-4o",
258258
"usage": {
259259
"prompt_tokens": 40,
260260
"completion_tokens": 50,

code/tests/functional/tests/backend_api/integrated_vectorization_custom_conversation/test_iv_question_answer_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def completions_mocking(httpserver: HTTPServer, app_config: AppConfig):
6363
"id": "chatcmpl-6v7mkQj980V1yBec6ETrKPRqFjNw9",
6464
"object": "chat.completion",
6565
"created": 1679072642,
66-
"model": "gpt-35-turbo",
66+
"model": "gpt-4o",
6767
"usage": {
6868
"prompt_tokens": 40,
6969
"completion_tokens": 50,

docs/LOCAL_DEPLOYMENT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ Execute the above [shell command](#L81) to run the function locally. You may nee
191191
|AZURE_SEARCH_USE_INTEGRATED_VECTORIZATION ||Whether to use [Integrated Vectorization](https://learn.microsoft.com/en-us/azure/search/vector-search-integrated-vectorization)|
192192
|AZURE_OPENAI_RESOURCE||the name of your Azure OpenAI resource|
193193
|AZURE_OPENAI_MODEL||The name of your model deployment|
194-
|AZURE_OPENAI_MODEL_NAME|gpt-35-turbo|The name of the model|
195-
|AZURE_OPENAI_MODEL_VERSION|0613|The version of the model to use|
194+
|AZURE_OPENAI_MODEL_NAME|gpt-4o|The name of the model|
195+
|AZURE_OPENAI_MODEL_VERSION|2024-05-13|The version of the model to use|
196196
|AZURE_OPENAI_API_KEY||One of the API keys of your Azure OpenAI resource|
197197
|AZURE_OPENAI_EMBEDDING_MODEL|text-embedding-ada-002|The name of your Azure OpenAI embeddings model deployment|
198198
|AZURE_OPENAI_EMBEDDING_MODEL_NAME|text-embedding-ada-002|The name of the embeddings model (can be found in Azure AI Studio)|

docs/TEAMS_LOCAL_DEPLOYMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Or use the [Azure Functions VS Code extension](https://marketplace.visualstudio.
6565
|AZURE_SEARCH_FILTER||Filter to apply to search queries.|
6666
|AZURE_OPENAI_RESOURCE||the name of your Azure OpenAI resource|
6767
|AZURE_OPENAI_MODEL||The name of your model deployment|
68-
|AZURE_OPENAI_MODEL_NAME|gpt-35-turbo|The name of the model|
68+
|AZURE_OPENAI_MODEL_NAME|gpt-4o|The name of the model|
6969
|AZURE_OPENAI_API_KEY||One of the API keys of your Azure OpenAI resource|
7070
|AZURE_OPENAI_EMBEDDING_MODEL|text-embedding-ada-002|The name of you Azure OpenAI embeddings model deployment|
7171
|AZURE_OPENAI_TEMPERATURE|0|What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. A value of 0 is recommended when using your data.|

docs/model_configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ This document outlines the necessary steps and configurations required for setti
1515

1616
### LLM
1717
- `AZURE_OPENAI_MODEL`: The Azure OpenAI Model Deployment Name
18-
- example: `my-gpt-35-turbo-16k`
18+
- example: `my-gpt-4o`
1919
- `AZURE_OPENAI_MODEL_NAME`: The Azure OpenAI Model Name
20-
- example: `gpt-35-turbo-16k`
20+
- example: `gpt-4o`
2121
- `AZURE_OPENAI_MODEL_VERSION`: The Azure OpenAI Model Version
22-
- example: `0613`
22+
- example: `2024-05-13`
2323
- `AZURE_OPENAI_MODEL_CAPACITY`: The Tokens per Minute Rate Limit (thousands)
2424
- example: `30`
2525

infra/main.bicep

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,13 @@ param azureOpenAIResourceName string = 'openai-${resourceToken}'
125125
param azureOpenAISkuName string = 'S0'
126126

127127
@description('Azure OpenAI Model Deployment Name')
128-
param azureOpenAIModel string = 'gpt-35-turbo-16k'
128+
param azureOpenAIModel string = 'gpt-4o'
129129

130130
@description('Azure OpenAI Model Name')
131-
param azureOpenAIModelName string = 'gpt-35-turbo-16k'
131+
param azureOpenAIModelName string = 'gpt-4o'
132132

133133
@description('Azure OpenAI Model Version')
134-
param azureOpenAIModelVersion string = '0613'
134+
param azureOpenAIModelVersion string = '2024-05-13'
135135

136136
@description('Azure OpenAI Model Capacity - See here for more info https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/quota')
137137
param azureOpenAIModelCapacity int = 30

0 commit comments

Comments
 (0)