From 05113245528e46c7c5c4eeab51855849fb873368 Mon Sep 17 00:00:00 2001 From: LovelyGuYiMeng <76251800+LovelyGuYiMeng@users.noreply.github.com> Date: Thu, 12 Sep 2024 22:22:39 +0800 Subject: [PATCH 1/3] Update openai.ts --- src/config/modelProviders/openai.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/config/modelProviders/openai.ts b/src/config/modelProviders/openai.ts index 3021fce7b4c9d..f3bc737c86d37 100644 --- a/src/config/modelProviders/openai.ts +++ b/src/config/modelProviders/openai.ts @@ -35,7 +35,7 @@ const OpenAI: ModelProviderCard = { { description: 'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。', - displayName: 'GPT-4o (240806)', + displayName: 'GPT-4o 0806', enabled: true, functionCall: true, id: 'gpt-4o-2024-08-06', @@ -49,7 +49,7 @@ const OpenAI: ModelProviderCard = { { description: 'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。', - displayName: 'GPT-4o (240513)', + displayName: 'GPT-4o 0513', functionCall: true, id: 'gpt-4o-2024-05-13', pricing: { @@ -88,7 +88,7 @@ const OpenAI: ModelProviderCard = { { description: '最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。', - displayName: 'GPT-4 Turbo Vision (240409)', + displayName: 'GPT-4 Turbo Vision 0409', functionCall: true, id: 'gpt-4-turbo-2024-04-09', pricing: { @@ -113,7 +113,7 @@ const OpenAI: ModelProviderCard = { { description: '最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。', - displayName: 'GPT-4 Turbo Preview (0125)', + displayName: 'GPT-4 Turbo Preview 0125', functionCall: true, id: 'gpt-4-0125-preview', pricing: { @@ -148,7 +148,7 @@ const OpenAI: ModelProviderCard = { { description: '最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。', - displayName: 'GPT-4 Turbo Preview (1106)', + displayName: 'GPT-4 Turbo Preview 1106', functionCall: true, id: 'gpt-4-1106-preview', pricing: { @@ -172,7 +172,7 @@ const OpenAI: ModelProviderCard = { { description: 'GPT-4 提供了一个更大的上下文窗口,能够处理更长的文本输入,适用于需要广泛信息整合和数据分析的场景。', - displayName: 'GPT-4 (0613)', + displayName: 'GPT-4 0613', functionCall: true, id: 'gpt-4-0613', pricing: { @@ -197,7 +197,7 @@ const OpenAI: ModelProviderCard = { // Will be discontinued on June 6, 2025 description: 'GPT-4 提供了一个更大的上下文窗口,能够处理更长的文本输入,适用于需要广泛信息整合和数据分析的场景。', - displayName: 'GPT-4 32K (0613)', + displayName: 'GPT-4 32K 0613', functionCall: true, id: 'gpt-4-32k-0613', pricing: { @@ -221,7 +221,7 @@ const OpenAI: ModelProviderCard = { { description: 'GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125', - displayName: 'GPT-3.5 Turbo (0125)', + displayName: 'GPT-3.5 Turbo 0125', functionCall: true, id: 'gpt-3.5-turbo-0125', pricing: { @@ -233,7 +233,7 @@ const OpenAI: ModelProviderCard = { { description: 'GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125', - displayName: 'GPT-3.5 Turbo (1106)', + displayName: 'GPT-3.5 Turbo 1106', functionCall: true, id: 'gpt-3.5-turbo-1106', pricing: { @@ -269,7 +269,7 @@ const OpenAI: ModelProviderCard = { { description: 'GPT-3.5 Turbo 是 OpenAI 的一款基础模型,结合了高效性和经济性,广泛用于文本生成、理解和分析,专为指导性提示进行调整,去除了与聊天相关的优化。', - displayName: 'GPT-3.5 Turbo (0613)', + displayName: 'GPT-3.5 Turbo 0613', // Will be discontinued on September 13, 2024 id: 'gpt-3.5-turbo-0613', legacy: true, From 1df923f7cccf192fc8ad518f0810e53b44c4f37a Mon Sep 17 00:00:00 2001 From: LovelyGuYiMeng <76251800+LovelyGuYiMeng@users.noreply.github.com> Date: Thu, 12 Sep 2024 22:46:48 +0800 Subject: [PATCH 2/3] Update index.test.ts.snap --- .../openai/__snapshots__/index.test.ts.snap | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libs/agent-runtime/openai/__snapshots__/index.test.ts.snap b/src/libs/agent-runtime/openai/__snapshots__/index.test.ts.snap index 81287865943e3..40284cef6ce9c 100644 --- a/src/libs/agent-runtime/openai/__snapshots__/index.test.ts.snap +++ b/src/libs/agent-runtime/openai/__snapshots__/index.test.ts.snap @@ -49,7 +49,7 @@ exports[`LobeOpenAI > models > should get models 1`] = ` }, { "description": "最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。", - "displayName": "GPT-4 Turbo Preview (0125)", + "displayName": "GPT-4 Turbo Preview 0125", "functionCall": true, "id": "gpt-4-0125-preview", "pricing": { @@ -84,7 +84,7 @@ exports[`LobeOpenAI > models > should get models 1`] = ` }, { "description": "GPT-3.5 Turbo 是 OpenAI 的一款基础模型,结合了高效性和经济性,广泛用于文本生成、理解和分析,专为指导性提示进行调整,去除了与聊天相关的优化。", - "displayName": "GPT-3.5 Turbo (0613)", + "displayName": "GPT-3.5 Turbo 0613", "id": "gpt-3.5-turbo-0613", "legacy": true, "pricing": { @@ -95,7 +95,7 @@ exports[`LobeOpenAI > models > should get models 1`] = ` }, { "description": "GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125", - "displayName": "GPT-3.5 Turbo (1106)", + "displayName": "GPT-3.5 Turbo 1106", "functionCall": true, "id": "gpt-3.5-turbo-1106", "pricing": { @@ -106,7 +106,7 @@ exports[`LobeOpenAI > models > should get models 1`] = ` }, { "description": "最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。", - "displayName": "GPT-4 Turbo Preview (1106)", + "displayName": "GPT-4 Turbo Preview 1106", "functionCall": true, "id": "gpt-4-1106-preview", "pricing": { @@ -139,7 +139,7 @@ exports[`LobeOpenAI > models > should get models 1`] = ` }, { "description": "GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125", - "displayName": "GPT-3.5 Turbo (0125)", + "displayName": "GPT-3.5 Turbo 0125", "functionCall": true, "id": "gpt-3.5-turbo-0125", "pricing": { @@ -150,7 +150,7 @@ exports[`LobeOpenAI > models > should get models 1`] = ` }, { "description": "GPT-4 提供了一个更大的上下文窗口,能够处理更长的文本输入,适用于需要广泛信息整合和数据分析的场景。", - "displayName": "GPT-4 (0613)", + "displayName": "GPT-4 0613", "functionCall": true, "id": "gpt-4-0613", "pricing": { From a9e852eb32da0f0f2db7d299a21e770e8024ccf0 Mon Sep 17 00:00:00 2001 From: LovelyGuYiMeng <76251800+LovelyGuYiMeng@users.noreply.github.com> Date: Thu, 12 Sep 2024 22:47:19 +0800 Subject: [PATCH 3/3] Update index.test.ts.snap --- .../routers/edge/config/__snapshots__/index.test.ts.snap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/routers/edge/config/__snapshots__/index.test.ts.snap b/src/server/routers/edge/config/__snapshots__/index.test.ts.snap index 1931595af8e8f..baeadb695787b 100644 --- a/src/server/routers/edge/config/__snapshots__/index.test.ts.snap +++ b/src/server/routers/edge/config/__snapshots__/index.test.ts.snap @@ -39,7 +39,7 @@ exports[`configRouter > getGlobalConfig > Model Provider env > OPENAI_MODEL_LIST [ { "description": "GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125", - "displayName": "GPT-3.5 Turbo (1106)", + "displayName": "GPT-3.5 Turbo 1106", "enabled": true, "functionCall": true, "id": "gpt-3.5-turbo-1106", @@ -99,7 +99,7 @@ exports[`configRouter > getGlobalConfig > Model Provider env > OPENAI_MODEL_LIST }, { "description": "最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。", - "displayName": "GPT-4 Turbo Preview (1106)", + "displayName": "GPT-4 Turbo Preview 1106", "enabled": true, "functionCall": true, "id": "gpt-4-1106-preview", @@ -127,7 +127,7 @@ exports[`configRouter > getGlobalConfig > Model Provider env > OPENAI_MODEL_LIST exports[`configRouter > getGlobalConfig > Model Provider env > OPENAI_MODEL_LIST > show the hidden model 1`] = ` { "description": "最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。", - "displayName": "GPT-4 Turbo Preview (1106)", + "displayName": "GPT-4 Turbo Preview 1106", "enabled": true, "functionCall": true, "id": "gpt-4-1106-preview",