Skip to content

Commit 43a2d35

Browse files
committed
chore: update default model
1 parent 1d8bc17 commit 43a2d35

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
[![Open in GitHub Codespaces](https://img.shields.io/static/v1?style=for-the-badge&label=GitHub+Codespaces&message=Open&color=brightgreen&logo=github)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=684521881&machine=standardLinux32gb&devcontainer_path=.devcontainer%2Fdevcontainer.json&location=WestUs2)
3333
[![Open in Remote - Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Remote%20-%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/azure-samples/azure-search-openai-javascript)
3434

35-
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 the ChatGPT model (gpt-35-turbo), and Azure AI Search for data indexing and retrieval.
35+
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 the ChatGPT model (gpt-4o-mini), and Azure AI Search for data indexing and retrieval.
3636

3737
![Retrieval Augmented Generation Architecture](docs/rag-architecture.png)
3838

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ description: A javascript sample app that chats with your data using OpenAI and
5050
[![Open in GitHub Codespaces](https://img.shields.io/static/v1?style=for-the-badge&label=GitHub+Codespaces&message=Open&color=brightgreen&logo=github)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=684521881&machine=standardLinux32gb&devcontainer_path=.devcontainer%2Fdevcontainer.json&location=WestUs2)
5151
[![Open in Remote - Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Remote%20-%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/azure-samples/azure-search-openai-javascript)
5252

53-
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 the ChatGPT model (gpt-35-turbo), and Azure AI Search for data indexing and retrieval.
53+
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 the ChatGPT model (gpt-4o-mini), and Azure AI Search for data indexing and retrieval.
5454

5555
![Retrieval Augmented Generation Architecture](rag-architecture.png)
5656

packages/indexer/test/helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async function config() {
1919
await fs.copyFile(path.join(__dirname, '../../package.json'), path.join(__dirname, '../../test-dist/package.json'));
2020

2121
process.env.AZURE_OPENAI_CHATGPT_DEPLOYMENT = 'chat';
22-
process.env.AZURE_OPENAI_CHATGPT_MODEL = 'gpt-3.5-turbo';
22+
process.env.AZURE_OPENAI_CHATGPT_MODEL = 'gpt-4o-mini';
2323
process.env.AZURE_OPENAI_EMBEDDING_DEPLOYMENT = 'embeddings';
2424
process.env.AZURE_OPENAI_EMBEDDING_MODEL = '';
2525
process.env.AZURE_OPENAI_SERVICE = 'https://example.com';

packages/search/src/lib/tokens.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ const MODEL_TOKEN_LIMITS: Record<string, number> = {
88
'gpt-3.5-turbo-16k': 16_000,
99
'gpt-4': 8100,
1010
'gpt-4-32k': 32_000,
11+
'gpt-4o': 128_000,
12+
'gpt-4o-mini': 128_000,
1113
};
1214

1315
const AZURE_OPENAI_TO_TIKTOKEN_MODELS: Record<string, string> = {

packages/search/src/plugins/config.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export default fp(
3434
azureSearchIndex: process.env.AZURE_SEARCH_INDEX || '',
3535
azureOpenAiService: process.env.AZURE_OPENAI_SERVICE || '',
3636
azureOpenAiChatGptDeployment: process.env.AZURE_OPENAI_CHATGPT_DEPLOYMENT || '',
37-
azureOpenAiChatGptModel: process.env.AZURE_OPENAI_CHATGPT_MODEL || 'gpt-35-turbo',
37+
azureOpenAiChatGptModel: process.env.AZURE_OPENAI_CHATGPT_MODEL || 'gpt-4o-mini',
3838
azureOpenAiEmbeddingDeployment: process.env.AZURE_OPENAI_EMBEDDING_DEPLOYMENT || '',
3939
azureOpenAiEmbeddingModel: process.env.AZURE_OPENAI_EMBEDDING_MODEL || 'text-embedding-ada-002',
4040
kbFieldsContent: process.env.KB_FIELDS_CONTENT || 'content',
@@ -54,9 +54,7 @@ export default fp(
5454

5555
fastify.decorate('config', config);
5656
},
57-
{
58-
name: 'config',
59-
},
57+
{ name: 'config' },
6058
);
6159

6260
// When using .decorate you have to specify added properties for Typescript

packages/search/test/helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async function config() {
3030
// Use fixed values when .env file is not present
3131
// Note: if you update snapshots, you must also update the values here to match your .env file
3232
process.env.AZURE_OPENAI_CHATGPT_DEPLOYMENT = 'chat';
33-
process.env.AZURE_OPENAI_CHATGPT_MODEL = 'gpt-3.5-turbo';
33+
process.env.AZURE_OPENAI_CHATGPT_MODEL = 'gpt-4o-mini';
3434
process.env.AZURE_OPENAI_EMBEDDING_DEPLOYMENT = 'embedding';
3535
process.env.AZURE_OPENAI_EMBEDDING_MODEL = '';
3636
process.env.AZURE_OPENAI_SERVICE = 'cog-x2y5k2ccncqou';

packages/search/test/lib/message-builder.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { MessageBuilder } from '../../src/lib/message-builder.js';
33

44
t.test('MessageBuilder', (t) => {
55
const systemContent = 'Welcome to the chat!';
6-
const chatgptModel = 'gpt-3.5-turbo';
6+
const chatgptModel = 'gpt-4o-mini-turbo';
77
const messageBuilder = new MessageBuilder(systemContent, chatgptModel);
88

99
t.test('constructor', (t) => {

0 commit comments

Comments
 (0)