mirror of
https://github.com/labring/FastGPT.git
synced 2026-04-25 02:01:53 +08:00
3f4400a500
* feat: model config with brand-new price calculate machanism (#6616) * fix: image read and json error (Agent) (#6502) * fix: 1.image read 2.JSON parsing error * dataset cite and pause * perf: plancall second parse * add test --------- Co-authored-by: archer <545436317@qq.com> * master message * remove invalid code * wip: model config * feat: model config with brand-new price calculate machanism * merge main branch * ajust calculate way * ajust priceTiers resolve procession * perf: price config code * fix: default price * fix: test * fix: comment * fix test --------- Co-authored-by: YeYuheng <57035043+YYH211@users.noreply.github.com> Co-authored-by: archer <545436317@qq.com> * wip: fix modal UI (#6634) * wip: fix modal UI * fix: maxInputToken set * chore: add price unit for non llm models * chore: replace question mark icon with beta tag (#6672) * feat:rerank too long; fix:rerank ui(agent),embedding returns 0 (#6663) * feat:rerank too long; fix:rerank ui(agent),embedding returns 0 * rerank * fix:rerank function * perf: rerank code * fix rerank * perf: model price ui --------- Co-authored-by: archer <545436317@qq.com> * remove llmtype field * revert model init * fix: filed * fix: model select filter * perf: multiple selector render * remove invalid checker * remove invalid i18n * perf: model selector tip * perf: model selector tip * fix cr * limit pnpm version * fix: i18n * fix action * set default mintoken * update i18n * perf: usage push * fix:rerank model ui (#6677) * fix: tier match error * fix: testr --------- Co-authored-by: Ryo <whoeverimf5@gmail.com> Co-authored-by: YeYuheng <57035043+YYH211@users.noreply.github.com>
106 lines
4.1 KiB
JSON
106 lines
4.1 KiB
JSON
// 已使用 json5 进行解析,会自动去掉注释,无需手动去除
|
||
{
|
||
"feConfigs": {
|
||
"lafEnv": "https://laf.dev" // laf环境。 https://laf.run (杭州阿里云) ,或者私有化的laf环境。如果使用 Laf openapi 功能,需要最新版的 laf 。
|
||
},
|
||
"systemEnv": {
|
||
"vectorMaxProcess": 15,
|
||
"qaMaxProcess": 15,
|
||
"pgHNSWEfSearch": 100 // 向量搜索参数。越大,搜索越精确,但是速度越慢。设置为100,有99%+精度。
|
||
},
|
||
"llmModels": [
|
||
{
|
||
"model": "gpt-5", // 模型名(对应OneAPI中渠道的模型名)
|
||
"name": "gpt-5", // 模型别名
|
||
"avatar": "/imgs/model/openai.svg", // 模型的logo
|
||
"maxContext": 125000, // 最大上下文
|
||
"maxResponse": 16000, // 最大回复
|
||
"quoteMaxToken": 120000, // 最大引用内容
|
||
"maxTemperature": 1.2, // 最大温度
|
||
"charsPointsPrice": 0, // n积分/1k token(商业版)
|
||
"censor": false, // 是否开启敏感校验(商业版)
|
||
"vision": true, // 是否支持图片输入
|
||
"toolChoice": true, // 是否支持工具选择(分类,内容提取,工具调用会用到。目前只有gpt支持)
|
||
"functionCall": false, // 是否支持函数调用(分类,内容提取,工具调用会用到。会优先使用 toolChoice,如果为false,则使用 functionCall,如果仍为 false,则使用提示词模式)
|
||
"customCQPrompt": "", // 自定义文本分类提示词(不支持工具和函数调用的模型
|
||
"customExtractPrompt": "", // 自定义内容提取提示词
|
||
"defaultSystemChatPrompt": "", // 对话默认携带的系统提示词
|
||
"defaultConfig": {} // 请求API时,挟带一些默认配置(比如 GLM4 的 top_p)
|
||
},
|
||
{
|
||
"model": "gpt-4o",
|
||
"name": "gpt-4o",
|
||
"avatar": "/imgs/model/openai.svg",
|
||
"maxContext": 125000,
|
||
"maxResponse": 4000,
|
||
"quoteMaxToken": 120000,
|
||
"maxTemperature": 1.2,
|
||
"charsPointsPrice": 0,
|
||
"censor": false,
|
||
"vision": true,
|
||
"toolChoice": true,
|
||
"functionCall": false,
|
||
"customCQPrompt": "",
|
||
"customExtractPrompt": "",
|
||
"defaultSystemChatPrompt": "",
|
||
"defaultConfig": {}
|
||
}
|
||
],
|
||
"vectorModels": [
|
||
{
|
||
"model": "text-embedding-ada-002", // 模型名(与OneAPI对应)
|
||
"name": "Embedding-2", // 模型展示名
|
||
"avatar": "/imgs/model/openai.svg", // logo
|
||
"charsPointsPrice": 0, // n积分/1k token
|
||
"defaultToken": 700, // 默认文本分割时候的 token
|
||
"maxToken": 3000, // 最大 token
|
||
"weight": 100, // 优先训练权重
|
||
"defaultConfig": {}, // 自定义额外参数。例如,如果希望使用 embedding3-large 的话,可以传入 dimensions:1024,来返回1024维度的向量。(目前必须小于1536维度)
|
||
"dbConfig": {}, // 存储时的额外参数(非对称向量模型时候需要用到)
|
||
"queryConfig": {} // 参训时的额外参数
|
||
},
|
||
{
|
||
"model": "text-embedding-3-large",
|
||
"name": "text-embedding-3-large",
|
||
"avatar": "/imgs/model/openai.svg",
|
||
"charsPointsPrice": 0,
|
||
"defaultToken": 512,
|
||
"maxToken": 3000,
|
||
"weight": 100,
|
||
"defaultConfig": {
|
||
"dimensions": 1024
|
||
}
|
||
},
|
||
{
|
||
"model": "text-embedding-3-small",
|
||
"name": "text-embedding-3-small",
|
||
"avatar": "/imgs/model/openai.svg",
|
||
"charsPointsPrice": 0,
|
||
"defaultToken": 512,
|
||
"maxToken": 3000,
|
||
"weight": 100
|
||
}
|
||
],
|
||
"reRankModels": [],
|
||
"audioSpeechModels": [
|
||
{
|
||
"model": "tts-1",
|
||
"name": "OpenAI TTS1",
|
||
"charsPointsPrice": 0,
|
||
"voices": [
|
||
{ "label": "Alloy", "value": "alloy", "bufferId": "openai-Alloy" },
|
||
{ "label": "Echo", "value": "echo", "bufferId": "openai-Echo" },
|
||
{ "label": "Fable", "value": "fable", "bufferId": "openai-Fable" },
|
||
{ "label": "Onyx", "value": "onyx", "bufferId": "openai-Onyx" },
|
||
{ "label": "Nova", "value": "nova", "bufferId": "openai-Nova" },
|
||
{ "label": "Shimmer", "value": "shimmer", "bufferId": "openai-Shimmer" }
|
||
]
|
||
}
|
||
],
|
||
"whisperModel": {
|
||
"model": "whisper-1",
|
||
"name": "Whisper1",
|
||
"charsPointsPrice": 0
|
||
}
|
||
}
|