From f0169c89ac4154f02ebc8e80a97a17da66166d2c Mon Sep 17 00:00:00 2001 From: "Aschen (Adrien Maret)" Date: Sun, 14 Apr 2024 20:27:58 +0200 Subject: [PATCH] openai: add latest gpt4 turbo model --- .../src/plugins/openai/nodes/CreateAssistantNode.ts | 2 +- packages/core/src/utils/openai.ts | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/core/src/plugins/openai/nodes/CreateAssistantNode.ts b/packages/core/src/plugins/openai/nodes/CreateAssistantNode.ts index b76ca428a..159886f2b 100644 --- a/packages/core/src/plugins/openai/nodes/CreateAssistantNode.ts +++ b/packages/core/src/plugins/openai/nodes/CreateAssistantNode.ts @@ -213,7 +213,7 @@ export const CreateAssistantNodeImpl: PluginNodeImpl = { useInputToggleDataKey: 'useModelInput', label: 'Model', options: openAiModelOptions, - defaultValue: 'gpt-4-1106-preview', + defaultValue: 'gpt-4-turbo', }, { type: 'string', diff --git a/packages/core/src/utils/openai.ts b/packages/core/src/utils/openai.ts index c37f2aa6d..4c7e5c47a 100644 --- a/packages/core/src/utils/openai.ts +++ b/packages/core/src/utils/openai.ts @@ -116,7 +116,15 @@ export const openaiModels = { prompt: 0.01, completion: 0.03, }, - displayName: 'GPT-4 Turbo 128K', + displayName: 'GPT-4 Turbo 128K (1106 Preview)', + }, + 'gpt-4-turbo': { + maxTokens: 128000, + cost: { + prompt: 0.01, + completion: 0.03, + }, + displayName: 'GPT-4 Turbo 128K with Vision', }, 'gpt-4-vision-preview': { maxTokens: 128000, @@ -124,7 +132,7 @@ export const openaiModels = { prompt: 0.01, completion: 0.03, }, - displayName: 'GPT-4 Vision', + displayName: 'GPT-4 Vision (Preview)', }, 'local-model': { maxTokens: Number.MAX_SAFE_INTEGER,