mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
V4.8.20 feature (#3686)
* Aiproxy (#3649) * model config * feat: model config ui * perf: rename variable * feat: custom request url * perf: model buffer * perf: init model * feat: json model config * auto login * fix: ts * update packages * package * fix: dockerfile * feat: usage filter & export & dashbord (#3538) * feat: usage filter & export & dashbord * adjust ui * fix tmb scroll * fix code & selecte all * merge * perf: usages list;perf: move components (#3654) * perf: usages list * team sub plan load * perf: usage dashboard code * perf: dashboard ui * perf: move components * add default model config (#3653) * 4.8.20 test (#3656) * provider * perf: model config * model perf (#3657) * fix: model * dataset quote * perf: model config * model tag * doubao model config * perf: config model * feat: model test * fix: POST 500 error on dingtalk bot (#3655) * feat: default model (#3662) * move model config * feat: default model * fix: false triggerd org selection (#3661) * export usage csv i18n (#3660) * export usage csv i18n * fix build * feat: markdown extension (#3663) * feat: markdown extension * media cros * rerank test * default price * perf: default model * fix: cannot custom provider * fix: default model select * update bg * perf: default model selector * fix: usage export * i18n * fix: rerank * update init extension * perf: ip limit check * doubao model order * web default modle * perf: tts selector * perf: tts error * qrcode package * reload buffer (#3665) * reload buffer * reload buffer * tts selector * fix: err tip (#3666) * fix: err tip * perf: training queue * doc * fix interactive edge (#3659) * fix interactive edge * fix * comment * add gemini model * fix: chat model select * perf: supplement assistant empty response (#3669) * perf: supplement assistant empty response * check array * perf: max_token count;feat: support resoner output;fix: member scroll (#3681) * perf: supplement assistant empty response * check array * perf: max_token count * feat: support resoner output * member scroll * update provider order * i18n * fix: stream response (#3682) * perf: supplement assistant empty response * check array * fix: stream response * fix: model config cannot set to null * fix: reasoning response (#3684) * perf: supplement assistant empty response * check array * fix: reasoning response * fix: reasoning response * doc (#3685) * perf: supplement assistant empty response * check array * doc * lock * animation * update doc * update compose * doc * doc --------- Co-authored-by: heheer <heheer@sealos.io> Co-authored-by: a.e. <49438478+I-Info@users.noreply.github.com>
This commit is contained in:
@@ -27,139 +27,13 @@ OPENAI_BASE_URL=https://api.siliconflow.cn/v1
|
||||
CHAT_API_KEY=sk-xxxxxx
|
||||
```
|
||||
|
||||
## 3. 修改 FastGPT 配置文件
|
||||
## 3. 修改 FastGPT 模型配置
|
||||
|
||||
我们选取 SiliconCloud 中的模型作为 FastGPT 配置。这里配置了 `Qwen2.5 72b` 的纯语言和视觉模型;选择 `bge-m3` 作为向量模型;选择 `bge-reranker-v2-m3` 作为重排模型。选择 `fish-speech-1.5` 作为语音模型;选择 `SenseVoiceSmall` 作为语音输入模型。
|
||||
系统内置了几个硅基流动的模型进行体验,如果需要其他模型,可以手动添加。
|
||||
|
||||
注意:ReRank 模型仍需配置一次 Api Key
|
||||
这里启动了 `Qwen2.5 72b` 的纯语言和视觉模型;选择 `bge-m3` 作为向量模型;选择 `bge-reranker-v2-m3` 作为重排模型。选择 `fish-speech-1.5` 作为语音模型;选择 `SenseVoiceSmall` 作为语音输入模型。
|
||||
|
||||
```json
|
||||
{
|
||||
"llmModels": [
|
||||
{
|
||||
"provider": "Other", // 模型提供商,主要用于分类展示,目前已经内置提供商包括:https://github.com/labring/FastGPT/blob/main/packages/global/core/ai/provider.ts, 可 pr 提供新的提供商,或直接填写 Other
|
||||
"model": "Qwen/Qwen2.5-72B-Instruct", // 模型名(对应OneAPI中渠道的模型名)
|
||||
"name": "Qwen2.5-72B-Instruct", // 模型别名
|
||||
"maxContext": 32000, // 最大上下文
|
||||
"maxResponse": 4000, // 最大回复
|
||||
"quoteMaxToken": 30000, // 最大引用内容
|
||||
"maxTemperature": 1, // 最大温度
|
||||
"charsPointsPrice": 0, // n积分/1k token(商业版)
|
||||
"censor": false, // 是否开启敏感校验(商业版)
|
||||
"vision": false, // 是否支持图片输入
|
||||
"datasetProcess": true, // 是否设置为文本理解模型(QA),务必保证至少有一个为true,否则知识库会报错
|
||||
"usedInClassify": true, // 是否用于问题分类(务必保证至少有一个为true)
|
||||
"usedInExtractFields": true, // 是否用于内容提取(务必保证至少有一个为true)
|
||||
"usedInToolCall": true, // 是否用于工具调用(务必保证至少有一个为true)
|
||||
"usedInQueryExtension": true, // 是否用于问题优化(务必保证至少有一个为true)
|
||||
"toolChoice": true, // 是否支持工具选择(分类,内容提取,工具调用会用到。)
|
||||
"functionCall": false, // 是否支持函数调用(分类,内容提取,工具调用会用到。会优先使用 toolChoice,如果为false,则使用 functionCall,如果仍为 false,则使用提示词模式)
|
||||
"customCQPrompt": "", // 自定义文本分类提示词(不支持工具和函数调用的模型
|
||||
"customExtractPrompt": "", // 自定义内容提取提示词
|
||||
"defaultSystemChatPrompt": "", // 对话默认携带的系统提示词
|
||||
"defaultConfig": {}, // 请求API时,挟带一些默认配置(比如 GLM4 的 top_p)
|
||||
"fieldMap": {} // 字段映射(o1 模型需要把 max_tokens 映射为 max_completion_tokens)
|
||||
},
|
||||
{
|
||||
"provider": "Other",
|
||||
"model": "Qwen/Qwen2-VL-72B-Instruct",
|
||||
"name": "Qwen2-VL-72B-Instruct",
|
||||
"maxContext": 32000,
|
||||
"maxResponse": 4000,
|
||||
"quoteMaxToken": 30000,
|
||||
"maxTemperature": 1,
|
||||
"charsPointsPrice": 0,
|
||||
"censor": false,
|
||||
"vision": true,
|
||||
"datasetProcess": false,
|
||||
"usedInClassify": false,
|
||||
"usedInExtractFields": false,
|
||||
"usedInToolCall": false,
|
||||
"usedInQueryExtension": false,
|
||||
"toolChoice": false,
|
||||
"functionCall": false,
|
||||
"customCQPrompt": "",
|
||||
"customExtractPrompt": "",
|
||||
"defaultSystemChatPrompt": "",
|
||||
"defaultConfig": {}
|
||||
}
|
||||
],
|
||||
"vectorModels": [
|
||||
{
|
||||
"provider": "Other",
|
||||
"model": "Pro/BAAI/bge-m3",
|
||||
"name": "Pro/BAAI/bge-m3",
|
||||
"charsPointsPrice": 0,
|
||||
"defaultToken": 512,
|
||||
"maxToken": 5000,
|
||||
"weight": 100
|
||||
}
|
||||
],
|
||||
"reRankModels": [
|
||||
{
|
||||
"model": "BAAI/bge-reranker-v2-m3", // 这里的model需要对应 siliconflow 的模型名
|
||||
"name": "BAAI/bge-reranker-v2-m3",
|
||||
"requestUrl": "https://api.siliconflow.cn/v1/rerank",
|
||||
"requestAuth": "siliconflow 上申请的 key"
|
||||
}
|
||||
],
|
||||
"audioSpeechModels": [
|
||||
{
|
||||
"model": "fishaudio/fish-speech-1.5",
|
||||
"name": "fish-speech-1.5",
|
||||
"voices": [
|
||||
{
|
||||
"label": "fish-alex",
|
||||
"value": "fishaudio/fish-speech-1.5:alex",
|
||||
"bufferId": "fish-alex"
|
||||
},
|
||||
{
|
||||
"label": "fish-anna",
|
||||
"value": "fishaudio/fish-speech-1.5:anna",
|
||||
"bufferId": "fish-anna"
|
||||
},
|
||||
{
|
||||
"label": "fish-bella",
|
||||
"value": "fishaudio/fish-speech-1.5:bella",
|
||||
"bufferId": "fish-bella"
|
||||
},
|
||||
{
|
||||
"label": "fish-benjamin",
|
||||
"value": "fishaudio/fish-speech-1.5:benjamin",
|
||||
"bufferId": "fish-benjamin"
|
||||
},
|
||||
{
|
||||
"label": "fish-charles",
|
||||
"value": "fishaudio/fish-speech-1.5:charles",
|
||||
"bufferId": "fish-charles"
|
||||
},
|
||||
{
|
||||
"label": "fish-claire",
|
||||
"value": "fishaudio/fish-speech-1.5:claire",
|
||||
"bufferId": "fish-claire"
|
||||
},
|
||||
{
|
||||
"label": "fish-david",
|
||||
"value": "fishaudio/fish-speech-1.5:david",
|
||||
"bufferId": "fish-david"
|
||||
},
|
||||
{
|
||||
"label": "fish-diana",
|
||||
"value": "fishaudio/fish-speech-1.5:diana",
|
||||
"bufferId": "fish-diana"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"whisperModel": {
|
||||
"model": "FunAudioLLM/SenseVoiceSmall",
|
||||
"name": "SenseVoiceSmall",
|
||||
"charsPointsPrice": 0
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 4. 重启 FastGPT
|
||||

|
||||
|
||||
## 5. 体验测试
|
||||
|
||||
|
Reference in New Issue
Block a user