Skip to content

Commit

Permalink
💄 style: update some provider modellist & fix ai360 baseurl (lobehub#…
Browse files Browse the repository at this point in the history
…4679)

* Update deepseek.ts

* Update siliconcloud.ts

* Update wenxin.ts

* Update qwen.ts

* Update baichuan.ts

* Update siliconcloud.ts

* Update index.ts

* Update index.test.ts
  • Loading branch information
LovelyGuYiMeng authored Nov 12, 2024
1 parent 7cface2 commit 1b19fae
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 28 deletions.
32 changes: 30 additions & 2 deletions src/config/modelProviders/baichuan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,40 @@ const Baichuan: ModelProviderCard = {
},
tokens: 32_768,
},
{
description:
'模型能力国内第一,在知识百科、长文本、生成创作等中文任务上超越国外主流模型。还具备行业领先的多模态能力,多项权威评测基准表现优异。',
displayName: 'Baichuan 4 Turbo',
enabled: true,
functionCall: true,
id: 'Baichuan4-Turbo',
maxOutput: 4096,
pricing: {
currency: 'CNY',
input: 15,
output: 15,
},
tokens: 32_768,
},
{
description:
'模型能力国内第一,在知识百科、长文本、生成创作等中文任务上超越国外主流模型。还具备行业领先的多模态能力,多项权威评测基准表现优异。',
displayName: 'Baichuan 4 Air',
enabled: true,
functionCall: true,
id: 'Baichuan4-Air',
maxOutput: 4096,
pricing: {
currency: 'CNY',
input: 0.98,
output: 0.98,
},
tokens: 32_768,
},
{
description:
'针对企业高频场景优化,效果大幅提升,高性价比。相对于Baichuan2模型,内容创作提升20%,知识问答提升17%, 角色扮演能力提升40%。整体效果比GPT3.5更优。',
displayName: 'Baichuan 3 Turbo',
enabled: true,
functionCall: true,
id: 'Baichuan3-Turbo',
maxOutput: 8192,
Expand All @@ -37,7 +66,6 @@ const Baichuan: ModelProviderCard = {
description:
'具备 128K 超长上下文窗口,针对企业高频场景优化,效果大幅提升,高性价比。相对于Baichuan2模型,内容创作提升20%,知识问答提升17%, 角色扮演能力提升40%。整体效果比GPT3.5更优。',
displayName: 'Baichuan 3 Turbo 128k',
enabled: true,
id: 'Baichuan3-Turbo-128k',
maxOutput: 4096,
pricing: {
Expand Down
2 changes: 1 addition & 1 deletion src/config/modelProviders/deepseek.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const DeepSeek: ModelProviderCard = {
output: 2,
},
releasedAt: '2024-09-05',
tokens: 64_000,
tokens: 65_536,
},
],
checkModel: 'deepseek-chat',
Expand Down
38 changes: 19 additions & 19 deletions src/config/modelProviders/qwen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,17 @@ const Qwen: ModelProviderCard = {
},
tokens: 131_072,
},
{
description: '通义千问代码模型。',
displayName: 'Qwen Coder Plus',
id: 'qwen-coder-plus-latest',
pricing: {
currency: 'CNY',
input: 3.5,
output: 7,
},
tokens: 131_072,
},
{
description: '通义千问2.5对外开源的7B规模的模型。',
displayName: 'Qwen2.5 7B',
Expand Down Expand Up @@ -166,17 +177,6 @@ const Qwen: ModelProviderCard = {
},
tokens: 131_072,
},
{
description: 'Qwen-Math 模型具有强大的数学解题能力。',
displayName: 'Qwen2.5 Math 1.5B',
id: 'qwen2.5-math-1.5b-instruct',
pricing: {
currency: 'CNY',
input: 0,
output: 0,
},
tokens: 4096,
},
{
description: 'Qwen-Math 模型具有强大的数学解题能力。',
displayName: 'Qwen2.5 Math 7B',
Expand All @@ -201,23 +201,23 @@ const Qwen: ModelProviderCard = {
},
{
description: '通义千问代码模型开源版。',
displayName: 'Qwen2.5 Coder 1.5B',
id: 'qwen2.5-coder-1.5b-instruct',
displayName: 'Qwen2.5 Coder 7B',
id: 'qwen2.5-coder-7b-instruct',
pricing: {
currency: 'CNY',
input: 0,
output: 0,
input: 1,
output: 2,
},
tokens: 131_072,
},
{
description: '通义千问代码模型开源版。',
displayName: 'Qwen2.5 Coder 7B',
id: 'qwen2.5-coder-7b-instruct',
displayName: 'Qwen2.5 Coder 32B',
id: 'qwen2.5-coder-32b-instruct',
pricing: {
currency: 'CNY',
input: 1,
output: 2,
input: 3.5,
output: 7,
},
tokens: 131_072,
},
Expand Down
20 changes: 16 additions & 4 deletions src/config/modelProviders/siliconcloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ import { ModelProviderCard } from '@/types/llm';
// ref :https://siliconflow.cn/zh-cn/pricing
const SiliconCloud: ModelProviderCard = {
chatModels: [
{
description: 'Hunyuan-Large 是业界最大的开源 Transformer 架构 MoE 模型,拥有 3890 亿总参数量和 520 亿激活参数量。',
displayName: 'Hunyuan Large',
enabled: true,
id: 'Tencent/Hunyuan-A52B-Instruct',
pricing: {
currency: 'CNY',
input: 21,
output: 21,
},
tokens: 32_768,
},
{
description: 'DeepSeek V2.5 集合了先前版本的优秀特征,增强了通用和编码能力。',
displayName: 'DeepSeek V2.5',
Expand Down Expand Up @@ -105,12 +117,12 @@ const SiliconCloud: ModelProviderCard = {
},
{
description: 'Qwen2.5-Coder 专注于代码编写。',
displayName: 'Qwen2.5 Coder 7B',
id: 'Qwen/Qwen2.5-Coder-7B-Instruct',
displayName: 'Qwen2.5 Coder 32B',
id: 'Qwen/Qwen2.5-Coder-32B-Instruct',
pricing: {
currency: 'CNY',
input: 0,
output: 0,
input: 1.26,
output: 1.26,
},
tokens: 32_768,
},
Expand Down
13 changes: 13 additions & 0 deletions src/config/modelProviders/wenxin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,19 @@ const BaiduWenxin: ModelProviderCard = {
},
tokens: 8192,
},
{
description:
'百度自研的旗舰级超大规模⼤语⾔模型,综合效果表现出色,广泛适用于各领域复杂任务场景;支持自动对接百度搜索插件,保障问答信息时效。相较于ERNIE 4.0在性能表现上更优秀',
displayName: 'ERNIE 4.0 Turbo 128K',
enabled: true,
id: 'ERNIE-4.0-Turbo-128K',
pricing: {
currency: 'CNY',
input: 20,
output: 60,
},
tokens: 128_000,
},
{
description:
'百度自研的旗舰级超大规模⼤语⾔模型,综合效果表现出色,广泛适用于各领域复杂任务场景;支持自动对接百度搜索插件,保障问答信息时效。相较于ERNIE 4.0在性能表现上更优秀',
Expand Down
2 changes: 1 addition & 1 deletion src/libs/agent-runtime/ai360/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import * as debugStreamModule from '../utils/debugStream';
import { LobeAi360AI } from './index';

const provider = ModelProvider.Ai360;
const defaultBaseURL = 'https://ai.360.cn/v1';
const defaultBaseURL = 'https://api.360.cn/v1';

const bizErrorType = 'ProviderBizError';
const invalidErrorType = 'InvalidProviderAPIKey';
Expand Down
2 changes: 1 addition & 1 deletion src/libs/agent-runtime/ai360/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ModelProvider } from '../types';
import { LobeOpenAICompatibleFactory } from '../utils/openaiCompatibleFactory';

export const LobeAi360AI = LobeOpenAICompatibleFactory({
baseURL: 'https://ai.360.cn/v1',
baseURL: 'https://api.360.cn/v1',
chatCompletion: {
handlePayload: (payload) => {
return {
Expand Down

0 comments on commit 1b19fae

Please sign in to comment.