Skip to content

Commit d1599da

Browse files
committed
Port to gpt-4o-mini as default
1 parent b6f9b76 commit d1599da

File tree

84 files changed

+289
-281
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+289
-281
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ This template, the application code and configuration it contains, has been buil
5151

5252
[📺 Watch a video overview of the app.](https://youtu.be/3acB0OWmLvM)
5353

54-
This sample demonstrates a few approaches for creating ChatGPT-like experiences over your own data using the Retrieval Augmented Generation pattern. It uses Azure OpenAI Service to access a GPT model (gpt-35-turbo), and Azure AI Search for data indexing and retrieval.
54+
This sample demonstrates a few approaches for creating ChatGPT-like experiences over your own data using the Retrieval Augmented Generation pattern. It uses Azure OpenAI Service to access a GPT model (gpt-4o-mini), and Azure AI Search for data indexing and retrieval.
5555

5656
The repo includes sample data so it's ready to try end to end. In this sample application we use a fictitious company called Contoso Electronics, and the experience allows its employees to ask questions about the benefits, internal policies, as well as job descriptions and roles.
5757

docs/deploy_existing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ You should set these values before running `azd up`. Once you've set them, retur
2727
1. Run `azd env set AZURE_OPENAI_RESOURCE_GROUP {Name of existing resource group that OpenAI service is provisioned to}`
2828
1. Run `azd env set AZURE_OPENAI_LOCATION {Location of existing OpenAI service}`
2929
1. Run `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT {Name of existing chat deployment}`. Only needed if your chat deployment is not the default 'chat'.
30-
1. Run `azd env set AZURE_OPENAI_CHATGPT_MODEL {Model name of existing chat deployment}`. Only needed if your chat model is not the default 'gpt-35-turbo'.
30+
1. Run `azd env set AZURE_OPENAI_CHATGPT_MODEL {Model name of existing chat deployment}`. Only needed if your chat model is not the default 'gpt-4o-turbo'.
3131
1. Run `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION {Version string for existing chat deployment}`. Only needed if your chat deployment model version is not the default '0125'. You definitely need to change this if you changed the model.
3232
1. Run `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKU {Name of SKU for existing chat deployment}`. Only needed if your chat deployment SKU is not the default 'Standard', like if it is 'GlobalStandard' instead.
3333
1. Run `azd env set AZURE_OPENAI_EMB_DEPLOYMENT {Name of existing embedding deployment}`. Only needed if your embeddings deployment is not the default 'embedding'.

docs/deploy_features.md

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
This document covers optional features that can be enabled in the deployed Azure resources.
55
You should typically enable these features before running `azd up`. Once you've set them, return to the [deployment steps](../README.md#deploying).
66

7-
* [Using GPT-4](#using-gpt-4)
7+
* [Using different chat completion models](#using-different-chat-completion-models)
88
* [Using text-embedding-3 models](#using-text-embedding-3-models)
99
* [Enabling GPT-4 Turbo with Vision](#enabling-gpt-4-turbo-with-vision)
1010
* [Enabling media description with Azure Content Understanding](#enabling-media-description-with-azure-content-understanding)
@@ -21,15 +21,11 @@ You should typically enable these features before running `azd up`. Once you've
2121
* [Deploying with private endpoints](#deploying-with-private-endpoints)
2222
* [Using local parsers](#using-local-parsers)
2323

24-
## Using GPT-4
24+
## Using different chat completion models
2525

26-
(Instructions for **GPT-4**, **GPT-4o**, and **GPT-4o mini** models are also included here.)
26+
As of late March 2025, the default chat completion model is `gpt-4o-mini`. If you deployed this sample before that date, the default model is `gpt-3.5-turbo`. You can change the chat completion model to any Azure OpenAI chat model that's available in your Azure OpenAI resource region by following these steps:
2727

28-
We generally find that most developers are able to get high-quality answers using GPT-3.5. However, if you want to try GPT-4, GPT-4o, or GPT-4o mini, you can do so by following these steps:
29-
30-
Execute the following commands inside your terminal:
31-
32-
1. To set the name of the deployment, run this command with a unique name in your Azure OpenAI account. You can use any deployment name, as long as it's unique in your Azure OpenAI account.
28+
1. To set the name of the deployment, run this command with a unique name in your Azure OpenAI account. You can use any deployment name, as long as it's unique in your Azure OpenAI account. For convenience, many developers use the same deployment name as the model name, but this is not required.
3329

3430
```bash
3531
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT <your-deployment-name>
@@ -38,10 +34,10 @@ Execute the following commands inside your terminal:
3834
For example:
3935

4036
```bash
41-
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT chat4
37+
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT gpt-4o
4238
```
4339

44-
1. To set the GPT model name to a **gpt-4**, **gpt-4o**, or **gpt-4o mini** version from the [available models](https://learn.microsoft.com/azure/ai-services/openai/concepts/models), run this command with the appropriate GPT model name.
40+
1. To set the GPT model to a different [available model](https://learn.microsoft.com/azure/ai-services/openai/concepts/models), run this command with the appropriate model name.
4541

4642
For GPT-4:
4743

@@ -61,19 +57,14 @@ Execute the following commands inside your terminal:
6157
azd env set AZURE_OPENAI_CHATGPT_MODEL gpt-4o-mini
6258
```
6359

64-
1. To set the Azure OpenAI deployment SKU name, run this command with [the desired SKU name](https://learn.microsoft.com/azure/ai-services/openai/how-to/deployment-types#deployment-types).
60+
For gpt-3.5-turbo:
6561

6662
```bash
67-
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKU GlobalStandard
63+
azd env set AZURE_OPENAI_CHATGPT_MODEL gpt-35-turbo
6864
```
6965

70-
1. To set the Azure OpenAI deployment capacity, run this command with the desired capacity.
71-
72-
```bash
73-
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_CAPACITY 10
74-
```
7566

76-
1. To set the Azure OpenAI deployment version from the [available versions](https://learn.microsoft.com/azure/ai-services/openai/concepts/models), run this command with the appropriate version.
67+
1. To set the Azure OpenAI model version from the [available versions](https://learn.microsoft.com/azure/ai-services/openai/concepts/models), run this command with the appropriate version string.
7768

7869
For GPT-4:
7970

@@ -93,23 +84,42 @@ Execute the following commands inside your terminal:
9384
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION 2024-07-18
9485
```
9586

87+
For gpt-3.5-turbo:
88+
89+
```bash
90+
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION 0125
91+
```
92+
93+
1. To set the Azure OpenAI deployment SKU name, run this command with [the desired SKU name](https://learn.microsoft.com/azure/ai-services/openai/how-to/deployment-types#deployment-types).
94+
95+
For GlobalStandard:
96+
97+
```bash
98+
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKU GlobalStandard
99+
```
100+
101+
For Standard:
102+
103+
```bash
104+
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKU Standard
105+
```
106+
107+
1. To set the Azure OpenAI deployment capacity (TPM, measured in thousands of tokens per minute), run this command with the desired capacity. This is not necessary if you are using the default capacity of 30.
108+
109+
```bash
110+
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_CAPACITY 20
111+
```
112+
96113
1. To update the deployment with the new parameters, run this command.
97114

98115
```bash
99116
azd up
100117
```
101118

119+
This process does *not* delete your previous model deployment. If you want to delete previous deployments, go to your Azure OpenAI resource in Azure AI Foundry and delete it there.
120+
102121
> [!NOTE]
103-
> To revert back to GPT 3.5, run the following commands:
104-
>
105-
> * `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT chat` to set the name of your old GPT 3.5 deployment.
106-
> * `azd env set AZURE_OPENAI_CHATGPT_MODEL gpt-35-turbo` to set the name of your old GPT 3.5 model.
107-
> * `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_CAPACITY 30` to set the capacity of your old GPT 3.5 deployment.
108-
> * `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_SKU Standard` to set the Sku name back to Standard.
109-
> * `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION 0125` to set the version number of your old GPT 3.5.
110-
> * `azd up` to update the provisioned resources.
111-
>
112-
> Note that this does not delete your GPT-4 deployment; it just makes your application create a new or reuse an old GPT 3.5 deployment. If you want to delete it, you can go to your Azure OpenAI studio and do so.
122+
> To revert back to a previous model, run the same commands with the previous model name and version.
113123

114124
## Using text-embedding-3 models
115125

docs/gpt4v.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ For more details on how this feature works, read [this blog post](https://techco
2323
* The ability to deploy a gpt-4o model in the [supported regions](https://learn.microsoft.com/azure/ai-services/openai/concepts/models#standard-deployment-model-availability). If you're not sure, try to create a gpt-4o deployment from your Azure OpenAI deployments page.
2424
* Ensure that you can deploy the Azure OpenAI resource group in [a region where all required components are available](https://learn.microsoft.com/azure/cognitive-services/openai/concepts/models#model-summary-table-and-region-availability):
2525
* Azure OpenAI models
26-
* gpt-35-turbo
26+
* gpt-4o-mini
2727
* text-embedding-ada-002
28-
* gpt-4o
28+
* gpt-4o (for vision/evaluation features)
2929
* [Azure AI Vision](https://learn.microsoft.com/azure/ai-services/computer-vision/)
3030

3131
### Deployment

0 commit comments

Comments
 (0)