From d5e7578821eaa342d0c668c2d30152ba82cafe5a Mon Sep 17 00:00:00 2001 From: LovelyGuYiMeng <76251800+LovelyGuYiMeng@users.noreply.github.com> Date: Thu, 19 Sep 2024 14:36:59 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style:=20updata=20qwen=20model?= =?UTF-8?q?=20info=20&=20add=20qwen2.5=20&=20reorder=20provider=20list=20(?= =?UTF-8?q?#4020)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update qwen.ts * Update qwen.ts * Update index.ts * Update providers.tsx * Update qwen.ts * Update qwen.ts --- .../settings/llm/ProviderList/providers.tsx | 8 +- src/config/modelProviders/index.ts | 8 +- src/config/modelProviders/qwen.ts | 80 +++++++++++++++---- 3 files changed, 71 insertions(+), 25 deletions(-) diff --git a/src/app/(main)/settings/llm/ProviderList/providers.tsx b/src/app/(main)/settings/llm/ProviderList/providers.tsx index 5462897e65172..829d09cb157c3 100644 --- a/src/app/(main)/settings/llm/ProviderList/providers.tsx +++ b/src/app/(main)/settings/llm/ProviderList/providers.tsx @@ -51,14 +51,14 @@ export const useProviderList = (): ProviderItem[] => { DeepSeekProviderCard, OpenRouterProviderCard, GithubProvider, - GroqProviderCard, NovitaProviderCard, - PerplexityProviderCard, - MistralProviderCard, TogetherAIProviderCard, FireworksAIProviderCard, - UpstageProviderCard, + GroqProviderCard, + PerplexityProviderCard, + MistralProviderCard, Ai21ProviderCard, + UpstageProviderCard, QwenProviderCard, SparkProviderCard, ZhiPuProviderCard, diff --git a/src/config/modelProviders/index.ts b/src/config/modelProviders/index.ts index d08d606505245..33bfd8d62b03e 100644 --- a/src/config/modelProviders/index.ts +++ b/src/config/modelProviders/index.ts @@ -69,14 +69,14 @@ export const DEFAULT_MODEL_PROVIDER_LIST = [ DeepSeekProvider, OpenRouterProvider, GithubProvider, - GroqProvider, NovitaProvider, - PerplexityProvider, - MistralProvider, TogetherAIProvider, FireworksAIProvider, - UpstageProvider, + GroqProvider, + PerplexityProvider, + MistralProvider, Ai21Provider, + UpstageProvider, QwenProvider, SparkProvider, ZhiPuProvider, diff --git a/src/config/modelProviders/qwen.ts b/src/config/modelProviders/qwen.ts index b8c2a4b1cdc88..d4849c248b03e 100644 --- a/src/config/modelProviders/qwen.ts +++ b/src/config/modelProviders/qwen.ts @@ -7,24 +7,38 @@ const Qwen: ModelProviderCard = { description: '通义千问超大规模语言模型,支持长文本上下文,以及基于长文档、多文档等多个场景的对话功能。', displayName: 'Qwen Long', - enabled: true, id: 'qwen-long', - tokens: 1_000_000, + pricing: { + currency: 'CNY', + input: 0.5, + output: 2, + }, + tokens: 1_000_000, // https://help.aliyun.com/zh/dashscope/developer-reference/model-introduction }, { description: '通义千问超大规模语言模型,支持中文、英文等不同语言输入', displayName: 'Qwen Turbo', enabled: true, functionCall: true, - id: 'qwen-turbo', - tokens: 8000, // https://www.alibabacloud.com/help/zh/model-studio/developer-reference/use-qwen-by-calling-api + id: 'qwen-turbo-latest', + pricing: { + currency: 'CNY', + input: 0.3, + output: 0.6, + }, + tokens: 131_072, // https://help.aliyun.com/zh/dashscope/developer-reference/model-introduction }, { description: '通义千问超大规模语言模型增强版,支持中文、英文等不同语言输入', displayName: 'Qwen Plus', enabled: true, functionCall: true, - id: 'qwen-plus', + id: 'qwen-plus-latest', + pricing: { + currency: 'CNY', + input: 0.8, + output: 2, + }, tokens: 131_072, // https://help.aliyun.com/zh/dashscope/developer-reference/model-introduction }, { @@ -33,16 +47,13 @@ const Qwen: ModelProviderCard = { displayName: 'Qwen Max', enabled: true, functionCall: true, - id: 'qwen-max', - tokens: 8000, - }, - { - description: - '通义千问千亿级别超大规模语言模型,支持中文、英文等不同语言输入,扩展了上下文窗口', - displayName: 'Qwen Max LongContext', - functionCall: true, - id: 'qwen-max-longcontext', - tokens: 30_000, + id: 'qwen-max-latest', + pricing: { + currency: 'CNY', + input: 20, + output: 60, + }, + tokens: 32_768, // https://help.aliyun.com/zh/dashscope/developer-reference/model-introduction }, { description: @@ -50,8 +61,13 @@ const Qwen: ModelProviderCard = { displayName: 'Qwen VL Plus', enabled: true, id: 'qwen-vl-plus', + pricing: { + currency: 'CNY', + input: 8, + output: 8, + }, tokens: 8192, - vision: true, + vision: true, // https://help.aliyun.com/zh/dashscope/developer-reference/tongyi-qianwen-vl-plus-api }, { description: @@ -59,31 +75,61 @@ const Qwen: ModelProviderCard = { displayName: 'Qwen VL Max', enabled: true, id: 'qwen-vl-max', + pricing: { + currency: 'CNY', + input: 20, + output: 20, + }, tokens: 32_768, - vision: true, + vision: true, // https://help.aliyun.com/zh/dashscope/developer-reference/tongyi-qianwen-vl-plus-api }, // ref :https://help.aliyun.com/zh/dashscope/developer-reference/tongyi-qianwen-7b-14b-72b-api-detailes + { + description: '通义千问2.5对外开源的7B规模的模型', + displayName: 'Qwen2.5 7B', + functionCall: true, + id: 'qwen2.5-7b-instruct', + tokens: 131_072, // https://huggingface.co/Qwen/Qwen2.5-7B-Instruct + }, + { + description: '通义千问2.5对外开源的32B规模的模型', + displayName: 'Qwen2.5 32B', + functionCall: true, + id: 'qwen2.5-32b-instruct', + tokens: 131_072, // https://huggingface.co/Qwen/Qwen2.5-32B-Instruct + }, + { + description: '通义千问2.5对外开源的72B规模的模型', + displayName: 'Qwen2.5 72B', + functionCall: true, + id: 'qwen2.5-72b-instruct', + tokens: 131_072, // https://huggingface.co/Qwen/Qwen2.5-72B-Instruct + }, { description: '通义千问2对外开源的7B规模的模型', displayName: 'Qwen2 7B', + functionCall: true, id: 'qwen2-7b-instruct', tokens: 131_072, // https://huggingface.co/Qwen/Qwen2-7B-Instruct }, { description: '通义千问2对外开源的57B规模14B激活参数的MOE模型', displayName: 'Qwen2 57B A14B MoE', + functionCall: true, id: 'qwen2-57b-a14b-instruct', tokens: 65_536, // https://huggingface.co/Qwen/Qwen2-57B-A14B-Instruct }, { description: '通义千问2对外开源的72B规模的模型', displayName: 'Qwen2 72B', + functionCall: true, id: 'qwen2-72b-instruct', tokens: 131_072, // https://huggingface.co/Qwen/Qwen2-72B-Instruct }, { description: 'Qwen2-Math 模型具有强大的数学解题能力', displayName: 'Qwen2 Math 72B', + functionCall: true, id: 'qwen2-math-72b-instruct', tokens: 4096, // https://help.aliyun.com/zh/dashscope/developer-reference/use-qwen2-math-by-calling-api },