From 99ce976b06888cdce85f97fc4c9a466a8b38c2cb Mon Sep 17 00:00:00 2001 From: Archer <545436317@qq.com> Date: Thu, 23 Jan 2025 18:32:45 +0800 Subject: [PATCH] 4.8.20 test (#3656) * provider * perf: model config --- packages/global/core/ai/provider.ts | 6 + .../ai/config/embedding/Embedding-V1.json | 10 + .../ai/config/embedding/baidu-tao-8k.json | 10 + .../core/ai/config/embedding/bge-m3.json | 10 + .../embedding/doubao-embedding-large.json | 10 + .../ai/config/embedding/doubao-embedding.json | 10 + .../config/embedding/hunyuan-embedding.json | 10 + .../config/embedding/zhipu-embedding-3.json | 13 ++ .../core/ai/config/llm/gemini-exp-1206.json | 29 +++ .../core/ai/config/llm/hunyuan-pro-32k.json | 29 +++ .../ai/config/llm/hunyuan-turbo-vision.json | 29 +++ .../core/ai/config/llm/qwen-coder-turbo.json | 29 +++ .../siliconflow-bge-reranker-v2-m3.json | 6 + .../stt/FunAudioLLM-SenseVoiceSmall.json | 6 + .../config/tts/Minimax-speech-01-turbo.json | 192 ++++++++++++++++++ .../tts/siliconflow-CosyVoice2-0.5B.json | 40 ++++ .../tts/siliconflow-RVC-Boss-GPT-SoVITS.json | 40 ++++ .../tts/siliconflow-fish-speech-1.5.json | 40 ++++ .../web/components/common/Icon/constants.ts | 7 +- .../common/Icon/icons/model/siliconflow.svg | 3 + packages/web/i18n/en/account.json | 2 + packages/web/i18n/en/common.json | 1 + packages/web/i18n/zh-CN/account.json | 2 + packages/web/i18n/zh-CN/common.json | 1 + packages/web/i18n/zh-Hant/account.json | 2 + packages/web/i18n/zh-Hant/common.json | 1 + .../account/model/ModelConfigTable.tsx | 23 +++ 27 files changed, 558 insertions(+), 3 deletions(-) create mode 100644 packages/service/core/ai/config/embedding/Embedding-V1.json create mode 100644 packages/service/core/ai/config/embedding/baidu-tao-8k.json create mode 100644 packages/service/core/ai/config/embedding/bge-m3.json create mode 100644 packages/service/core/ai/config/embedding/doubao-embedding-large.json create mode 100644 packages/service/core/ai/config/embedding/doubao-embedding.json create mode 100644 packages/service/core/ai/config/embedding/hunyuan-embedding.json create mode 100644 packages/service/core/ai/config/embedding/zhipu-embedding-3.json create mode 100644 packages/service/core/ai/config/llm/gemini-exp-1206.json create mode 100644 packages/service/core/ai/config/llm/hunyuan-pro-32k.json create mode 100644 packages/service/core/ai/config/llm/hunyuan-turbo-vision.json create mode 100644 packages/service/core/ai/config/llm/qwen-coder-turbo.json create mode 100644 packages/service/core/ai/config/rerank/siliconflow-bge-reranker-v2-m3.json create mode 100644 packages/service/core/ai/config/stt/FunAudioLLM-SenseVoiceSmall.json create mode 100644 packages/service/core/ai/config/tts/Minimax-speech-01-turbo.json create mode 100644 packages/service/core/ai/config/tts/siliconflow-CosyVoice2-0.5B.json create mode 100644 packages/service/core/ai/config/tts/siliconflow-RVC-Boss-GPT-SoVITS.json create mode 100644 packages/service/core/ai/config/tts/siliconflow-fish-speech-1.5.json create mode 100644 packages/web/components/common/Icon/icons/model/siliconflow.svg diff --git a/packages/global/core/ai/provider.ts b/packages/global/core/ai/provider.ts index 32e8c9915..05bc78407 100644 --- a/packages/global/core/ai/provider.ts +++ b/packages/global/core/ai/provider.ts @@ -20,6 +20,7 @@ export type ModelProviderIdType = | 'Baichuan' | 'StepFun' | 'Yi' + | 'Siliconflow' | 'Ollama' | 'BAAI' | 'FishAudio' @@ -155,6 +156,11 @@ export const ModelProviderList: ModelProviderType[] = [ name: i18nT('common:model_moka'), avatar: 'model/moka' }, + { + id: 'Siliconflow', + name: i18nT('common:model_siliconflow'), + avatar: 'model/siliconflow' + }, { id: 'Other', name: i18nT('common:model_other'), diff --git a/packages/service/core/ai/config/embedding/Embedding-V1.json b/packages/service/core/ai/config/embedding/Embedding-V1.json new file mode 100644 index 000000000..7c71ad428 --- /dev/null +++ b/packages/service/core/ai/config/embedding/Embedding-V1.json @@ -0,0 +1,10 @@ +{ + "provider": "Ernie", + "model": "Embedding-V1", + "name": "Embedding-V1", + + "defaultToken": 512, + "maxToken": 1000, + + "charsPointsPrice": 0 +} diff --git a/packages/service/core/ai/config/embedding/baidu-tao-8k.json b/packages/service/core/ai/config/embedding/baidu-tao-8k.json new file mode 100644 index 000000000..606aa906d --- /dev/null +++ b/packages/service/core/ai/config/embedding/baidu-tao-8k.json @@ -0,0 +1,10 @@ +{ + "provider": "Ernie", + "model": "tao-8k", + "name": "tao-8k", + + "defaultToken": 512, + "maxToken": 8000, + + "charsPointsPrice": 0 +} diff --git a/packages/service/core/ai/config/embedding/bge-m3.json b/packages/service/core/ai/config/embedding/bge-m3.json new file mode 100644 index 000000000..4963c7302 --- /dev/null +++ b/packages/service/core/ai/config/embedding/bge-m3.json @@ -0,0 +1,10 @@ +{ + "provider": "BAAI", + "model": "bge-m3", + "name": "bge-m3", + + "defaultToken": 512, + "maxToken": 8000, + + "charsPointsPrice": 0 +} diff --git a/packages/service/core/ai/config/embedding/doubao-embedding-large.json b/packages/service/core/ai/config/embedding/doubao-embedding-large.json new file mode 100644 index 000000000..ee474f990 --- /dev/null +++ b/packages/service/core/ai/config/embedding/doubao-embedding-large.json @@ -0,0 +1,10 @@ +{ + "provider": "Doubao", + "model": "Doubao-embedding-large", + "name": "Doubao-embedding-large", + + "defaultToken": 512, + "maxToken": 4096, + + "charsPointsPrice": 0 +} diff --git a/packages/service/core/ai/config/embedding/doubao-embedding.json b/packages/service/core/ai/config/embedding/doubao-embedding.json new file mode 100644 index 000000000..acdde31eb --- /dev/null +++ b/packages/service/core/ai/config/embedding/doubao-embedding.json @@ -0,0 +1,10 @@ +{ + "provider": "Doubao", + "model": "Doubao-embedding", + "name": "Doubao-embedding", + + "defaultToken": 512, + "maxToken": 4096, + + "charsPointsPrice": 0 +} diff --git a/packages/service/core/ai/config/embedding/hunyuan-embedding.json b/packages/service/core/ai/config/embedding/hunyuan-embedding.json new file mode 100644 index 000000000..725e572f5 --- /dev/null +++ b/packages/service/core/ai/config/embedding/hunyuan-embedding.json @@ -0,0 +1,10 @@ +{ + "provider": "Hunyuan", + "model": "hunyuan-embedding", + "name": "hunyuan-embedding", + + "defaultToken": 512, + "maxToken": 1024, + + "charsPointsPrice": 0 +} diff --git a/packages/service/core/ai/config/embedding/zhipu-embedding-3.json b/packages/service/core/ai/config/embedding/zhipu-embedding-3.json new file mode 100644 index 000000000..275a13d2b --- /dev/null +++ b/packages/service/core/ai/config/embedding/zhipu-embedding-3.json @@ -0,0 +1,13 @@ +{ + "provider": "ChatGLM", + "model": "embedding-3", + "name": "embedding-3", + + "defaultToken": 512, + "maxToken": 8000, + "defaultConfig": { + "dimensions": 1024 + }, + + "charsPointsPrice": 0 +} diff --git a/packages/service/core/ai/config/llm/gemini-exp-1206.json b/packages/service/core/ai/config/llm/gemini-exp-1206.json new file mode 100644 index 000000000..d5ba89541 --- /dev/null +++ b/packages/service/core/ai/config/llm/gemini-exp-1206.json @@ -0,0 +1,29 @@ +{ + "provider": "Gemini", + "model": "gemini-exp-1206", + "name": "gemini-exp-1206", + + "censor": false, + "charsPointsPrice": 0, + + "maxContext": 128000, + "maxResponse": 8000, + "quoteMaxToken": 120000, + "maxTemperature": 1, + + "vision": true, + "toolChoice": true, + "functionCall": false, + "defaultSystemChatPrompt": "", + + "datasetProcess": true, + "usedInClassify": true, + "customCQPrompt": "", + "usedInExtractFields": true, + "usedInQueryExtension": true, + "customExtractPrompt": "", + "usedInToolCall": true, + + "defaultConfig": {}, + "fieldMap": {} +} diff --git a/packages/service/core/ai/config/llm/hunyuan-pro-32k.json b/packages/service/core/ai/config/llm/hunyuan-pro-32k.json new file mode 100644 index 000000000..616a41839 --- /dev/null +++ b/packages/service/core/ai/config/llm/hunyuan-pro-32k.json @@ -0,0 +1,29 @@ +{ + "provider": "Hunyuan", + "model": "hunyuan-pro-32k(测试)", + "name": "hunyuan-pro-32k(测试)", + + "censor": false, + "charsPointsPrice": 0, + + "maxContext": 28000, + "maxResponse": 4000, + "quoteMaxToken": 28000, + "maxTemperature": 1, + + "vision": false, + "toolChoice": false, + "functionCall": false, + "defaultSystemChatPrompt": "", + + "datasetProcess": true, + "usedInClassify": true, + "customCQPrompt": "", + "usedInExtractFields": true, + "usedInQueryExtension": true, + "customExtractPrompt": "", + "usedInToolCall": true, + + "defaultConfig": {}, + "fieldMap": {} +} diff --git a/packages/service/core/ai/config/llm/hunyuan-turbo-vision.json b/packages/service/core/ai/config/llm/hunyuan-turbo-vision.json new file mode 100644 index 000000000..c5f0072f8 --- /dev/null +++ b/packages/service/core/ai/config/llm/hunyuan-turbo-vision.json @@ -0,0 +1,29 @@ +{ + "provider": "Hunyuan", + "model": "hunyuan-turbo-vision", + "name": "hunyuan-turbo-vision", + + "censor": false, + "charsPointsPrice": 0, + + "maxContext": 6000, + "maxResponse": 2000, + "quoteMaxToken": 6000, + "maxTemperature": 1, + + "vision": true, + "toolChoice": false, + "functionCall": false, + "defaultSystemChatPrompt": "", + + "datasetProcess": false, + "usedInClassify": false, + "customCQPrompt": "", + "usedInExtractFields": false, + "usedInQueryExtension": false, + "customExtractPrompt": "", + "usedInToolCall": false, + + "defaultConfig": {}, + "fieldMap": {} +} diff --git a/packages/service/core/ai/config/llm/qwen-coder-turbo.json b/packages/service/core/ai/config/llm/qwen-coder-turbo.json new file mode 100644 index 000000000..48491c157 --- /dev/null +++ b/packages/service/core/ai/config/llm/qwen-coder-turbo.json @@ -0,0 +1,29 @@ +{ + "provider": "Qwen", + "model": "qwen-coder-turbo", + "name": "qwen-coder-turbo", + + "censor": false, + "charsPointsPrice": 0, + + "maxContext": 128000, + "maxResponse": 8000, + "quoteMaxToken": 50000, + "maxTemperature": 1, + + "vision": false, + "toolChoice": false, + "functionCall": false, + "defaultSystemChatPrompt": "", + + "datasetProcess": false, + "usedInClassify": false, + "customCQPrompt": "", + "usedInExtractFields": false, + "usedInQueryExtension": false, + "customExtractPrompt": "", + "usedInToolCall": false, + + "defaultConfig": {}, + "fieldMap": {} +} diff --git a/packages/service/core/ai/config/rerank/siliconflow-bge-reranker-v2-m3.json b/packages/service/core/ai/config/rerank/siliconflow-bge-reranker-v2-m3.json new file mode 100644 index 000000000..96219e218 --- /dev/null +++ b/packages/service/core/ai/config/rerank/siliconflow-bge-reranker-v2-m3.json @@ -0,0 +1,6 @@ +{ + "provider": "Siliconflow", + "model": "BAAI/bge-reranker-v2-m3", + "name": "BAAI/bge-reranker-v2-m3", + "charsPointsPrice": 0 +} diff --git a/packages/service/core/ai/config/stt/FunAudioLLM-SenseVoiceSmall.json b/packages/service/core/ai/config/stt/FunAudioLLM-SenseVoiceSmall.json new file mode 100644 index 000000000..d923b42fa --- /dev/null +++ b/packages/service/core/ai/config/stt/FunAudioLLM-SenseVoiceSmall.json @@ -0,0 +1,6 @@ +{ + "provider": "Siliconflow", + "model": "FunAudioLLM/SenseVoiceSmall", + "name": "FunAudioLLM/SenseVoiceSmall", + "charsPointsPrice": 0 +} diff --git a/packages/service/core/ai/config/tts/Minimax-speech-01-turbo.json b/packages/service/core/ai/config/tts/Minimax-speech-01-turbo.json new file mode 100644 index 000000000..7bf8babe4 --- /dev/null +++ b/packages/service/core/ai/config/tts/Minimax-speech-01-turbo.json @@ -0,0 +1,192 @@ +{ + "provider": "MiniMax", + "model": "speech-01-turbo", + "name": "Minimax-speech-01-turbo", + "charsPointsPrice": 0, + "voices": [ + { + "label": "minimax-male-qn-qingse", + "value": "male-qn-qingse" + }, + { + "label": "minimax-male-qn-jingying", + "value": "male-qn-jingying" + }, + { + "label": "minimax-male-qn-badao", + "value": "male-qn-badao" + }, + { + "label": "minimax-male-qn-daxuesheng", + "value": "male-qn-daxuesheng" + }, + { + "label": "minimax-female-shaonv", + "value": "female-shaonv" + }, + { + "label": "minimax-female-yujie", + "value": "female-yujie" + }, + { + "label": "minimax-female-chengshu", + "value": "female-chengshu" + }, + { + "label": "minimax-female-tianmei", + "value": "female-tianmei" + }, + { + "label": "minimax-presenter_male", + "value": "presenter_male" + }, + { + "label": "minimax-presenter_female", + "value": "presenter_female" + }, + { + "label": "minimax-audiobook_male_1", + "value": "audiobook_male_1" + }, + { + "label": "minimax-audiobook_male_2", + "value": "audiobook_male_2" + }, + { + "label": "minimax-audiobook_female_1", + "value": "audiobook_female_1" + }, + { + "label": "minimax-audiobook_female_2", + "value": "audiobook_female_2" + }, + { + "label": "minimax-male-qn-qingse-jingpin", + "value": "male-qn-qingse-jingpin" + }, + { + "label": "minimax-male-qn-jingying-jingpin", + "value": "male-qn-jingying-jingpin" + }, + { + "label": "minimax-male-qn-badao-jingpin", + "value": "male-qn-badao-jingpin" + }, + { + "label": "minimax-male-qn-daxuesheng-jingpin", + "value": "male-qn-daxuesheng-jingpin" + }, + { + "label": "minimax-female-shaonv-jingpin", + "value": "female-shaonv-jingpin" + }, + { + "label": "minimax-female-yujie-jingpin", + "value": "female-yujie-jingpin" + }, + { + "label": "minimax-female-chengshu-jingpin", + "value": "female-chengshu-jingpin" + }, + { + "label": "minimax-female-tianmei-jingpin", + "value": "female-tianmei-jingpin" + }, + { + "label": "minimax-clever_boy", + "value": "clever_boy" + }, + { + "label": "minimax-cute_boy", + "value": "cute_boy" + }, + { + "label": "minimax-lovely_girl", + "value": "lovely_girl" + }, + { + "label": "minimax-cartoon_pig", + "value": "cartoon_pig" + }, + { + "label": "minimax-bingjiao_didi", + "value": "bingjiao_didi" + }, + { + "label": "minimax-junlang_nanyou", + "value": "junlang_nanyou" + }, + { + "label": "minimax-chunzhen_xuedi", + "value": "chunzhen_xuedi" + }, + { + "label": "minimax-lengdan_xiongzhang", + "value": "lengdan_xiongzhang" + }, + { + "label": "minimax-badao_shaoye", + "value": "badao_shaoye" + }, + { + "label": "minimax-tianxin_xiaoling", + "value": "tianxin_xiaoling" + }, + { + "label": "minimax-qiaopi_mengmei", + "value": "qiaopi_mengmei" + }, + { + "label": "minimax-wumei_yujie", + "value": "wumei_yujie" + }, + { + "label": "minimax-diadia_xuemei", + "value": "diadia_xuemei" + }, + { + "label": "minimax-danya_xuejie", + "value": "danya_xuejie" + }, + { + "label": "minimax-Santa_Claus", + "value": "Santa_Claus" + }, + { + "label": "minimax-Grinch", + "value": "Grinch" + }, + { + "label": "minimax-Rudolph", + "value": "Rudolph" + }, + { + "label": "minimax-Arnold", + "value": "Arnold" + }, + { + "label": "minimax-Charming_Santa", + "value": "Charming_Santa" + }, + { + "label": "minimax-Charming_Lady", + "value": "Charming_Lady" + }, + { + "label": "minimax-Sweet_Girl", + "value": "Sweet_Girl" + }, + { + "label": "minimax-Cute_Elf", + "value": "Cute_Elf" + }, + { + "label": "minimax-Attractive_Girl", + "value": "Attractive_Girl" + }, + { + "label": "minimax-Serene_Woman", + "value": "Serene_Woman" + } + ] +} diff --git a/packages/service/core/ai/config/tts/siliconflow-CosyVoice2-0.5B.json b/packages/service/core/ai/config/tts/siliconflow-CosyVoice2-0.5B.json new file mode 100644 index 000000000..e03e39de0 --- /dev/null +++ b/packages/service/core/ai/config/tts/siliconflow-CosyVoice2-0.5B.json @@ -0,0 +1,40 @@ +{ + "provider": "Siliconflow", + "model": "FunAudioLLM/CosyVoice2-0.5B", + "name": "FunAudioLLM/CosyVoice2-0.5B", + "charsPointsPrice": 0, + "voices": [ + { + "label": "alex", + "value": "FunAudioLLM/CosyVoice2-0.5B:alex" + }, + { + "label": "anna", + "value": "FunAudioLLM/CosyVoice2-0.5B:anna" + }, + { + "label": "bella", + "value": "FunAudioLLM/CosyVoice2-0.5B:bella" + }, + { + "label": "benjamin", + "value": "FunAudioLLM/CosyVoice2-0.5B:benjamin" + }, + { + "label": "charles", + "value": "FunAudioLLM/CosyVoice2-0.5B:charles" + }, + { + "label": "claire", + "value": "FunAudioLLM/CosyVoice2-0.5B:claire" + }, + { + "label": "david", + "value": "FunAudioLLM/CosyVoice2-0.5B:david" + }, + { + "label": "diana", + "value": "FunAudioLLM/CosyVoice2-0.5B:diana" + } + ] +} diff --git a/packages/service/core/ai/config/tts/siliconflow-RVC-Boss-GPT-SoVITS.json b/packages/service/core/ai/config/tts/siliconflow-RVC-Boss-GPT-SoVITS.json new file mode 100644 index 000000000..f1c18a5de --- /dev/null +++ b/packages/service/core/ai/config/tts/siliconflow-RVC-Boss-GPT-SoVITS.json @@ -0,0 +1,40 @@ +{ + "provider": "Siliconflow", + "model": "RVC-Boss/GPT-SoVITS", + "name": "RVC-Boss/GPT-SoVITS", + "charsPointsPrice": 0, + "voices": [ + { + "label": "alex", + "value": "RVC-Boss/GPT-SoVITS:alex" + }, + { + "label": "anna", + "value": "RVC-Boss/GPT-SoVITS:anna" + }, + { + "label": "bella", + "value": "RVC-Boss/GPT-SoVITS:bella" + }, + { + "label": "benjamin", + "value": "RVC-Boss/GPT-SoVITS:benjamin" + }, + { + "label": "charles", + "value": "RVC-Boss/GPT-SoVITS:charles" + }, + { + "label": "claire", + "value": "RVC-Boss/GPT-SoVITS:claire" + }, + { + "label": "david", + "value": "RVC-Boss/GPT-SoVITS:david" + }, + { + "label": "diana", + "value": "RVC-Boss/GPT-SoVITS:diana" + } + ] +} diff --git a/packages/service/core/ai/config/tts/siliconflow-fish-speech-1.5.json b/packages/service/core/ai/config/tts/siliconflow-fish-speech-1.5.json new file mode 100644 index 000000000..45fa6b4c4 --- /dev/null +++ b/packages/service/core/ai/config/tts/siliconflow-fish-speech-1.5.json @@ -0,0 +1,40 @@ +{ + "provider": "Siliconflow", + "model": "fishaudio/fish-speech-1.5", + "name": "fish-speech-1.5", + "charsPointsPrice": 0, + "voices": [ + { + "label": "alex", + "value": "fishaudio/fish-speech-1.5:alex" + }, + { + "label": "anna", + "value": "fishaudio/fish-speech-1.5:anna" + }, + { + "label": "bella", + "value": "fishaudio/fish-speech-1.5:bella" + }, + { + "label": "benjamin", + "value": "fishaudio/fish-speech-1.5:benjamin" + }, + { + "label": "charles", + "value": "fishaudio/fish-speech-1.5:charles" + }, + { + "label": "claire", + "value": "fishaudio/fish-speech-1.5:claire" + }, + { + "label": "david", + "value": "fishaudio/fish-speech-1.5:david" + }, + { + "label": "diana", + "value": "fishaudio/fish-speech-1.5:diana" + } + ] +} diff --git a/packages/web/components/common/Icon/constants.ts b/packages/web/components/common/Icon/constants.ts index acdec5f1a..4a34e0b54 100644 --- a/packages/web/components/common/Icon/constants.ts +++ b/packages/web/components/common/Icon/constants.ts @@ -270,7 +270,6 @@ export const iconPaths = { import('./icons/core/workflow/template/datasource.svg'), 'core/workflow/template/duckduckgo': () => import('./icons/core/workflow/template/duckduckgo.svg'), - 'core/workflow/template/sleep': () => import('./icons/core/workflow/template/sleep.svg'), 'core/workflow/template/extractJson': () => import('./icons/core/workflow/template/extractJson.svg'), 'core/workflow/template/fetchUrl': () => import('./icons/core/workflow/template/fetchUrl.svg'), @@ -296,6 +295,7 @@ export const iconPaths = { 'core/workflow/template/reply': () => import('./icons/core/workflow/template/reply.svg'), 'core/workflow/template/runApp': () => import('./icons/core/workflow/template/runApp.svg'), 'core/workflow/template/searxng': () => import('./icons/core/workflow/template/searxng.svg'), + 'core/workflow/template/sleep': () => import('./icons/core/workflow/template/sleep.svg'), 'core/workflow/template/stopTool': () => import('./icons/core/workflow/template/stopTool.svg'), 'core/workflow/template/systemConfig': () => import('./icons/core/workflow/template/systemConfig.svg'), @@ -377,18 +377,19 @@ export const iconPaths = { 'model/groq': () => import('./icons/model/groq.svg'), 'model/huggingface': () => import('./icons/model/huggingface.svg'), 'model/hunyuan': () => import('./icons/model/hunyuan.svg'), + 'model/intern': () => import('./icons/model/intern.svg'), 'model/meta': () => import('./icons/model/meta.svg'), 'model/minimax': () => import('./icons/model/minimax.svg'), 'model/mistral': () => import('./icons/model/mistral.svg'), + 'model/moka': () => import('./icons/model/moka.svg'), 'model/moonshot': () => import('./icons/model/moonshot.svg'), 'model/ollama': () => import('./icons/model/ollama.svg'), 'model/openai': () => import('./icons/model/openai.svg'), 'model/qwen': () => import('./icons/model/qwen.svg'), + 'model/siliconflow': () => import('./icons/model/siliconflow.svg'), 'model/sparkDesk': () => import('./icons/model/sparkDesk.svg'), 'model/stepfun': () => import('./icons/model/stepfun.svg'), 'model/yi': () => import('./icons/model/yi.svg'), - 'model/intern': () => import('./icons/model/intern.svg'), - 'model/moka': () => import('./icons/model/moka.svg'), more: () => import('./icons/more.svg'), moreLine: () => import('./icons/moreLine.svg'), out: () => import('./icons/out.svg'), diff --git a/packages/web/components/common/Icon/icons/model/siliconflow.svg b/packages/web/components/common/Icon/icons/model/siliconflow.svg new file mode 100644 index 000000000..b11c61059 --- /dev/null +++ b/packages/web/components/common/Icon/icons/model/siliconflow.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/packages/web/i18n/en/account.json b/packages/web/i18n/en/account.json index 01b72486e..45a7bb341 100644 --- a/packages/web/i18n/en/account.json +++ b/packages/web/i18n/en/account.json @@ -23,6 +23,8 @@ "model.custom_extract_prompt": "Custom content extraction prompt words", "model.custom_extract_prompt_tip": "Override system prompt word, default is:\n\"\"\"\n你可以从 <对话记录> 中提取指定 Json 信息,你仅需返回 Json 字符串,无需回答问题。\n<提取要求>\n{{description}}\n\n\n<提取规则>\n- 本次需提取的 json 字符串,需符合 JsonSchema 的规则。\n- type 代表数据类型; key 代表字段名; description 代表字段的描述; enum 是枚举值,代表可选的 value。\n- 如果没有可提取的内容,忽略该字段。\n\n\n\n{{json}}\n\n\n<对话记录>\n{{text}}\n\n\n提取的 json 字符串:\n\"\"\"", "model.dataset_process": "Dataset file parse", + "model.defaultConfig": "Additional Body parameters", + "model.defaultConfig_tip": "Each request will carry this additional Body parameter.", "model.default_config": "Body extra fields", "model.default_config_tip": "When initiating a conversation request, merge this configuration. \nFor example:\n\"\"\"\n{\n \"temperature\": 1,\n \"max_tokens\": null\n}\n\"\"\"", "model.default_system_chat_prompt": "Default prompt", diff --git a/packages/web/i18n/en/common.json b/packages/web/i18n/en/common.json index 0bb78391b..cbceef926 100644 --- a/packages/web/i18n/en/common.json +++ b/packages/web/i18n/en/common.json @@ -940,6 +940,7 @@ "model_moonshot": "Moonshot", "model_other": "Other", "model_qwen": "Qwen", + "model_siliconflow": "Siliconflow", "model_sparkdesk": "SprkDesk", "model_stepfun": "StepFun", "model_yi": "Yi", diff --git a/packages/web/i18n/zh-CN/account.json b/packages/web/i18n/zh-CN/account.json index 27cca01b5..f86c22ea1 100644 --- a/packages/web/i18n/zh-CN/account.json +++ b/packages/web/i18n/zh-CN/account.json @@ -23,6 +23,8 @@ "model.custom_extract_prompt": "自定义内容提取提示词", "model.custom_extract_prompt_tip": "覆盖系统的提示词,默认为:\n\"\"\"\n你可以从 <对话记录> 中提取指定 Json 信息,你仅需返回 Json 字符串,无需回答问题。\n<提取要求>\n{{description}}\n\n\n<提取规则>\n- 本次需提取的 json 字符串,需符合 JsonSchema 的规则。\n- type 代表数据类型; key 代表字段名; description 代表字段的描述; enum 是枚举值,代表可选的 value。\n- 如果没有可提取的内容,忽略该字段。\n\n\n\n{{json}}\n\n\n<对话记录>\n{{text}}\n\n\n提取的 json 字符串:\n\"\"\"", "model.dataset_process": "用于知识库文件处理", + "model.defaultConfig": "额外 Body 参数", + "model.defaultConfig_tip": "每次请求时候,都会携带该额外 Body 参数", "model.default_config": "Body 额外字段", "model.default_config_tip": "发起对话请求时候,合并该配置。例如:\n\"\"\"\n{\n \"temperature\": 1,\n \"max_tokens\": null\n}\n\"\"\"", "model.default_system_chat_prompt": "默认提示词", diff --git a/packages/web/i18n/zh-CN/common.json b/packages/web/i18n/zh-CN/common.json index 46955cff1..d138fb1cd 100644 --- a/packages/web/i18n/zh-CN/common.json +++ b/packages/web/i18n/zh-CN/common.json @@ -943,6 +943,7 @@ "model_moonshot": "月之暗面", "model_other": "其他", "model_qwen": "阿里千问", + "model_siliconflow": "硅基流动", "model_sparkdesk": "讯飞星火", "model_stepfun": "阶跃星辰", "model_yi": "零一万物", diff --git a/packages/web/i18n/zh-Hant/account.json b/packages/web/i18n/zh-Hant/account.json index be484438a..0ae7b65f1 100644 --- a/packages/web/i18n/zh-Hant/account.json +++ b/packages/web/i18n/zh-Hant/account.json @@ -22,6 +22,8 @@ "model.custom_extract_prompt": "自訂內容提取提示詞", "model.custom_extract_prompt_tip": "覆蓋系統的提示詞,預設為:\n\"\"\"\n你可以从 <对话记录> 中提取指定 Json 信息,你仅需返回 Json 字符串,无需回答问题。\n<提取要求>\n{{description}}\n\n\n<提取规则>\n- 本次需提取的 json 字符串,需符合 JsonSchema 的规则。\n- type 代表数据类型; key 代表字段名; description 代表字段的描述; enum 是枚举值,代表可选的 value。\n- 如果没有可提取的内容,忽略该字段。\n\n\n\n{{json}}\n\n\n<对话记录>\n{{text}}\n\n\n提取的 json 字符串:\n\"\"\"", "model.dataset_process": "用於知識庫文件處理", + "model.defaultConfig": "額外 Body 參數", + "model.defaultConfig_tip": "每次請求時候,都會攜帶該額外 Body 參數", "model.default_config": "Body 額外字段", "model.default_config_tip": "發起對話請求時候,合併該配置。例如:\n\"\"\"\n{\n \"temperature\": 1,\n \"max_tokens\": null\n}\n\"\"\"", "model.default_system_chat_prompt": "預設提示詞", diff --git a/packages/web/i18n/zh-Hant/common.json b/packages/web/i18n/zh-Hant/common.json index ebf4f4630..67abe21bf 100644 --- a/packages/web/i18n/zh-Hant/common.json +++ b/packages/web/i18n/zh-Hant/common.json @@ -939,6 +939,7 @@ "model_moonshot": "月之暗面", "model_other": "其他", "model_qwen": "阿里千問", + "model_siliconflow": "矽基流動", "model_sparkdesk": "訊飛星火", "model_stepfun": "階躍星辰", "model_yi": "零一萬物", diff --git a/projects/app/src/pageComponents/account/model/ModelConfigTable.tsx b/projects/app/src/pageComponents/account/model/ModelConfigTable.tsx index 2f414c044..62a722932 100644 --- a/projects/app/src/pageComponents/account/model/ModelConfigTable.tsx +++ b/projects/app/src/pageComponents/account/model/ModelConfigTable.tsx @@ -728,6 +728,29 @@ const ModelEditModal = ({ + + + + {t('account:model.defaultConfig')} + + + + + + { + try { + setValue('defaultConfig', JSON.parse(e)); + } catch (error) { + console.error(error); + } + }} + {...InputStyles} + /> + + + )} {isTTSModel && (