From f7af45bf31e028dd2473b5262cefd32f3727264e Mon Sep 17 00:00:00 2001 From: Stefano Capitani Date: Sat, 13 Jan 2024 09:22:57 +0100 Subject: [PATCH] Update model for openai service (#264) * Change model for openai service * Change model for openai service --- src/services/openai-translate.ts | 2 +- src/services/typechat.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/openai-translate.ts b/src/services/openai-translate.ts index 4b73cda..01d290f 100644 --- a/src/services/openai-translate.ts +++ b/src/services/openai-translate.ts @@ -32,7 +32,7 @@ async function translateSingleString( */ try { const completion = await openai.createCompletion({ - model: "text-davinci-003", + model: "gpt-3.5-turbo-instruct", prompt, temperature: 0.2, max_tokens: 2048, diff --git a/src/services/typechat.ts b/src/services/typechat.ts index 759ae36..79b5aec 100644 --- a/src/services/typechat.ts +++ b/src/services/typechat.ts @@ -85,7 +85,7 @@ function createLanguageModel( ): TypeChatLanguageModel { const apiKey = env.OPENAI_API_KEY ?? missingEnvironmentVariable("OPENAI_API_KEY"); - const model = env.OPENAI_MODEL ?? "text-davinci-003"; + const model = env.OPENAI_MODEL ?? "gpt-3.5-turbo-instruct"; const url = env.OPENAI_ENDPOINT ?? "https://api.openai.com/v1/chat/completions";