Skip to content

Commit

Permalink
Use gpt-4o as the default model
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrislucas committed May 18, 2024
1 parent 7afa19c commit 51d9507
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/services/OpenAiGptService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/OpenAiGptService.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 51d9507

Please sign in to comment.