From 51d9507d259610752ccf4586b841126e14f8b9d0 Mon Sep 17 00:00:00 2001 From: Ferris Lucas Date: Sat, 18 May 2024 18:13:47 -0500 Subject: [PATCH] Use gpt-4o as the default model --- src/services/OpenAiGptService.js | 2 +- test/OpenAiGptService.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/OpenAiGptService.js b/src/services/OpenAiGptService.js index 296f306..ea7fa2e 100644 --- a/src/services/OpenAiGptService.js +++ b/src/services/OpenAiGptService.js @@ -8,7 +8,7 @@ export default class OpenAiGptService { static async call(prompt, model, requestJsonOutput = true) { if (model == "gpt3") model = "gpt-3.5-turbo"; - if (model == "gpt4") model = "gpt-4-turbo-preview"; + if (model == "gpt4") model = "gpt-4o"; const configuration = new Configuration({ apiKey: process.env.OPENAI_API_KEY diff --git a/test/OpenAiGptService.test.js b/test/OpenAiGptService.test.js index 25f2314..ec990b7 100644 --- a/test/OpenAiGptService.test.js +++ b/test/OpenAiGptService.test.js @@ -104,7 +104,7 @@ describe('OpenAiGptService', () => { const prompt = 'What is the capital of France?'; const expectedResult = 'The capital of France is Paris.'; const models = ['gpt3', 'gpt4']; - const expectedModels = ['gpt-3.5-turbo', 'gpt-4-turbo-preview']; + const expectedModels = ['gpt-3.5-turbo', 'gpt-4o']; const openaiStub = sinon.stub(OpenAIApi.prototype, 'createChatCompletion').resolves({ data: {