From 0d50496f5c63a8abf07e4ffcba16ec3ebdea6d9b Mon Sep 17 00:00:00 2001 From: rxyshww <97021898@qq.com> Date: Thu, 5 Dec 2024 00:40:30 +0800 Subject: [PATCH 1/2] feat: update 4o-min --- docs/configuration.md | 10 ++-------- docs/features/chat.md | 4 ++-- .../src/redux/slices/serverStateReducer.ts | 2 +- gui-sidebar/src/redux/slices/stateSlice.ts | 4 ++-- gui-sidebar/src/shims/llm-constants.ts | 7 +------ gui-sidebar/src/shims/typings.d.ts | 4 +--- gui-sidebar/src/util/modelData.ts | 19 +++++++++---------- package.json | 16 +++++----------- .../providers/openaiProvider.ts | 2 +- 9 files changed, 24 insertions(+), 44 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 88007d9a..1b940405 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -64,15 +64,9 @@ examples: ```jsonc [ { - "title": "GPT-4", + "title": "GPT-4O Mini", "provider": "openai", - "model": "gpt-4", - }, - { - "title": "GPT-3.5 turbo", - "provider": "openai", - "model": "gpt-3.5-turbo", - "temperature": 0.75, + "model": "gpt-4o-mini", }, { "title": "QWen turbo", diff --git a/docs/features/chat.md b/docs/features/chat.md index 9a81fbab..4df78b8a 100644 --- a/docs/features/chat.md +++ b/docs/features/chat.md @@ -32,8 +32,8 @@ For example, use openai: "autodev.chat.models": [ { "provider": "openai", // chat provider - "title": "GPT-3.5 turbo", // Text displayed in selector - "model": "gpt-3.5-turbo" // Used chat model + "title": "GPT-4O Mini", // Text displayed in selector + "model": "gpt-4o-mini" // Used chat model } ] } diff --git a/gui-sidebar/src/redux/slices/serverStateReducer.ts b/gui-sidebar/src/redux/slices/serverStateReducer.ts index 388155bb..a1d59b8d 100644 --- a/gui-sidebar/src/redux/slices/serverStateReducer.ts +++ b/gui-sidebar/src/redux/slices/serverStateReducer.ts @@ -37,7 +37,7 @@ const initialState: ServerState = { config: { models: [ // new FreeTrial({ model: "gpt-4" }), - // new FreeTrial({ model: "gpt-3.5-turbo" }), + // new FreeTrial({ model: "gpt-4o-mini" }), ], } as any, contextProviders: [], diff --git a/gui-sidebar/src/redux/slices/stateSlice.ts b/gui-sidebar/src/redux/slices/stateSlice.ts index 25819573..27753a98 100644 --- a/gui-sidebar/src/redux/slices/stateSlice.ts +++ b/gui-sidebar/src/redux/slices/stateSlice.ts @@ -131,9 +131,9 @@ const initialState: State = { model: "gpt-4", }, { - title: "GPT-3.5 turbo", + title: "GPT-4O Mini", provider: "openai", - model: "gpt-3.5-turbo", + model: "gpt-4o-mini", }, { title: "ERNIE-Bot turbo", diff --git a/gui-sidebar/src/shims/llm-constants.ts b/gui-sidebar/src/shims/llm-constants.ts index 9a58858a..1b2cf29e 100644 --- a/gui-sidebar/src/shims/llm-constants.ts +++ b/gui-sidebar/src/shims/llm-constants.ts @@ -8,18 +8,13 @@ const DEFAULT_ARGS = { }; const CONTEXT_LENGTH_FOR_MODEL: { [name: string]: number } = { - "gpt-3.5-turbo": 4096, - "gpt-3.5-turbo-0613": 4096, - "gpt-3.5-turbo-16k": 16_384, "gpt-4": 8192, - "gpt-35-turbo-16k": 16_384, - "gpt-35-turbo-0613": 4096, - "gpt-35-turbo": 4096, "gpt-4-32k": 32_768, "gpt-4-turbo-preview": 128_000, "gpt-4-vision": 128_000, "gpt-4-0125-preview": 128_000, "gpt-4-1106-preview": 128_000, + "gpt-4o-mini": 4096, }; const TOKEN_BUFFER_FOR_SAFETY = 350; diff --git a/gui-sidebar/src/shims/typings.d.ts b/gui-sidebar/src/shims/typings.d.ts index d521f4f7..d7b03863 100644 --- a/gui-sidebar/src/shims/typings.d.ts +++ b/gui-sidebar/src/shims/typings.d.ts @@ -485,13 +485,11 @@ type ModelProvider = export type ModelName = | "AUTODETECT" // OpenAI - | "gpt-3.5-turbo" - | "gpt-3.5-turbo-16k" | "gpt-4" - | "gpt-3.5-turbo-0613" | "gpt-4-32k" | "gpt-4-turbo-preview" | "gpt-4-vision-preview" + | "gpt-4o-mini" // Open Source | "mistral-7b" | "mistral-8x7b" diff --git a/gui-sidebar/src/util/modelData.ts b/gui-sidebar/src/util/modelData.ts index 1ba27289..ef832ab9 100644 --- a/gui-sidebar/src/util/modelData.ts +++ b/gui-sidebar/src/util/modelData.ts @@ -526,14 +526,14 @@ const gpt4vision: ModelPackage = { icon: "openai.png", }; -const gpt35turbo: ModelPackage = { - title: "GPT-3.5-Turbo", +const gpt4omini: ModelPackage = { + title: "GPT-4O Mini", description: "A faster, cheaper OpenAI model with slightly lower capabilities", params: { - model: "gpt-3.5-turbo", + model: "gpt-4o-mini", contextLength: 8096, - title: "GPT-3.5-Turbo", + title: "GPT-4O Mini", }, providerOptions: ["openai", "freetrial"], icon: "openai.png", @@ -621,7 +621,7 @@ const AUTODETECT: ModelPackage = { export const MODEL_INFO: ModelPackage[] = [ gpt4turbo, gpt4, - gpt35turbo, + gpt4omini, geminiPro, claude3Opus, claude3Sonnet, @@ -641,15 +641,14 @@ export const PROVIDER_INFO: { [key: string]: ModelInfo } = { openai: { title: "OpenAI", provider: "openai", - description: "Use gpt-4, gpt-3.5-turbo, or any other OpenAI model", + description: "Use gpt-4o-mini or any other OpenAI model", longDescription: - "Use gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.", + "Use gpt-4o-mini or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.", icon: "openai.png", tags: [ModelProviderTag["Requires API Key"]], packages: [ gpt4, - gpt35turbo, - gpt4turbo, + gpt4omini, gpt4vision, { ...AUTODETECT, @@ -935,7 +934,7 @@ After it's up and running, you can start using Continue.`, { ...claude3Haiku, title: "Claude 3 Haiku (trial)" }, { ...geminiPro, title: "Gemini Pro (trial)" }, { ...gpt4vision, title: "GPT-4 Vision (trial)" }, - { ...gpt35turbo, title: "GPT-3.5-Turbo (trial)" }, + { ...gpt4omini, title: "GPT-4O Mini (trial)" }, { ...AUTODETECT, params: { diff --git a/package.json b/package.json index 2d993897..926ef1b7 100644 --- a/package.json +++ b/package.json @@ -137,9 +137,9 @@ "type": "array", "default": [ { - "title": "GPT-3.5 turbo", + "title": "GPT-4O Mini", "provider": "openai", - "model": "gpt-3.5-turbo", + "model": "gpt-4o-mini", "temperature": 0.75 }, { @@ -406,6 +406,7 @@ "autodev.openai.model": { "type": "string", "enum": [ + "gpt-4o-mini", "gpt-4o", "gpt-4o-2024-05-13", "gpt-4-turbo", @@ -419,16 +420,9 @@ "gpt-4-0613", "gpt-4-32k", "gpt-4-32k-0314", - "gpt-4-32k-0613", - "gpt-3.5-turbo", - "gpt-3.5-turbo-16k", - "gpt-3.5-turbo-0301", - "gpt-3.5-turbo-0613", - "gpt-3.5-turbo-1106", - "gpt-3.5-turbo-0125", - "gpt-3.5-turbo-16k-0613" + "gpt-4-32k-0613" ], - "default": "gpt-3.5-turbo", + "default": "gpt-4o-mini", "description": "%configuration.openai.model.description%", "order": 8 }, diff --git a/src/base/common/language-models/providers/openaiProvider.ts b/src/base/common/language-models/providers/openaiProvider.ts index 02795196..9f335370 100644 --- a/src/base/common/language-models/providers/openaiProvider.ts +++ b/src/base/common/language-models/providers/openaiProvider.ts @@ -209,7 +209,7 @@ export class OpenAILanguageModelProvider implements ILanguageModelProvider { return model; } - return this.configService.get('openai.model', 'gpt-3.5-turbo'); + return this.configService.get('openai.model', 'gpt-4o-mini'); } private _resolveComletionModel(model?: string) { From 44d5092557dd7dad60bcdac146deb27a00c05129 Mon Sep 17 00:00:00 2001 From: rxyshww <97021898@qq.com> Date: Thu, 5 Dec 2024 00:43:13 +0800 Subject: [PATCH 2/2] feat: update 4o-min --- docs/configuration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 1b940405..77af79e0 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -64,9 +64,9 @@ examples: ```jsonc [ { - "title": "GPT-4O Mini", + "title": "GPT-4", "provider": "openai", - "model": "gpt-4o-mini", + "model": "gpt-4", }, { "title": "QWen turbo",