Compare commits

...

24 Commits

Author SHA1 Message Date
Archer
fa92ef86b9 fix: system title (#3522) 2025-01-03 15:30:46 +08:00
Archer
f39ea04178 feat: new provider (#3513) 2025-01-02 15:38:06 +08:00
Archer
bd4893ced9 更新 README.md (#3511) 2025-01-02 10:31:25 +08:00
Archer
b75e807f24 fix: tool choice run same tool will error (#3502) 2024-12-31 10:58:52 +08:00
Archer
b2fdefdc0c update config.json (#3497) 2024-12-30 13:53:12 +08:00
Archer
896fec4b82 update doc (#3496) 2024-12-30 13:51:05 +08:00
Archer
50bf7f9a3b V4.8.17 feature (#3493)
* split tokens into input and output (#3477)

* split tokens into input and output

* query extension & tool call & question guide

* fix

* perf: input and output tokens

* perf: tool call if else

* perf: remove code

* fix: extract usage count

* fix: qa usage count

---------

Co-authored-by: heheer <heheer@sealos.io>
2024-12-30 10:13:25 +08:00
Archer
da2831b948 update doc (#3488) 2024-12-27 20:21:08 +08:00
Archer
b520988c64 V4.8.17 feature (#3485)
* feat: add third party account config (#3443)

* temp

* editor workflow variable style

* add team to dispatch

* i18n

* delete console

* change openai account position

* fix

* fix

* fix

* fix

* fix

* 4.8.17 test (#3461)

* perf: external provider config

* perf: ui

* feat: add template config (#3434)

* change template position

* template config

* delete console

* delete

* fix

* fix

* perf: Mongo visutal field (#3464)

* remve invalid code

* perf: team member visutal code

* perf: virtual search; perf: search test data

* fix: ts

* fix: image response headers

* perf: template code

* perf: auth layout;perf: auto save (#3472)

* perf: auth layout

* perf: auto save

* perf: auto save

* fix: template guide display & http input support external variables (#3475)

* fix: template guide display

* http editor support external workflow variables

* perf: auto save;fix: ifelse checker line break; (#3478)

* perf: auto save

* perf: auto save

* fix: ifelse checker line break

* perf: doc

* perf: doc

* fix: update var type error

* 4.8.17 test (#3479)

* perf: auto save

* perf: auto save

* perf: template code

* 4.8.17 test (#3480)

* perf: auto save

* perf: auto save

* perf: model price model

* feat: add react memo

* perf: model provider filter

* fix: ts (#3481)

* perf: auto save

* perf: auto save

* fix: ts

* simple app tool select (#3473)

* workflow plugin userguide & simple tool ui

* simple tool filter

* reuse component

* change component to hook

* fix

* perf: too selector modal (#3484)

* perf: auto save

* perf: auto save

* perf: markdown render

* perf: too selector

* fix: app version require tmbId

* perf: templates refresh

* perf: templates refresh

* hide auto save error tip

* perf: toolkit guide

---------

Co-authored-by: heheer <heheer@sealos.io>
2024-12-27 20:05:12 +08:00
Archer
a209856d48 Fix config (#3476)
* feat: SiliconCloud doc

* feat: SiliconCloud doc

* perf: silicon cloud doc

* perf: silicon cloud doc
2024-12-26 21:36:09 +08:00
f7942655a2 docs: fix typo (#3471) 2024-12-26 11:21:36 +08:00
Archer
108e1b92ef perf: model provider show; perf: get init data buffer (#3459)
* pr code

* perf: model table show

* perf: model provider show

* perf: get init data buffer

* perf: get init data buffer

* perf: icon
2024-12-24 15:12:07 +08:00
Archer
f646ef8595 feat: model select support close params;perf: dataset params slider;update doc (#3453)
* feat: model select support close params

* perf: dataset params slider

* update doc

* update doc

* add delete log

* perf: ai config overflow

* test

* test

* test

* delete collection tags

* delete collection tags
2024-12-23 23:47:33 +08:00
Archer
a7f25994d5 update doc (#3452) 2024-12-23 12:46:35 +08:00
Archer
58fbf78c6e perf: ai param config (#3451)
* perf: ai param config

* pacakge import

* perf: ai config doc
2024-12-23 10:31:15 +08:00
Archer
ae149069bf fix: pc check (#3447)
* fix: pc check

* fix: pc check
2024-12-21 12:28:32 +08:00
Archer
e5b8dea9ae perf: schema indexes (#3446) 2024-12-21 00:01:14 +08:00
imgbot[bot]
b48eff4212 [ImgBot] Optimize images (#3444)
*Total -- 8,930.88kb -> 6,422.90kb (28.08%)

/docSite/assets/imgs/dingtalk-bot-3.png -- 150.74kb -> 80.43kb (46.64%)
/docSite/assets/imgs/image-45.png -- 241.12kb -> 139.12kb (42.3%)
/docSite/assets/imgs/dingtalk-bot-7.png -- 157.98kb -> 93.12kb (41.05%)
/docSite/assets/imgs/image-22.png -- 85.17kb -> 50.65kb (40.52%)
/docSite/assets/imgs/image-21.png -- 166.09kb -> 105.67kb (36.37%)
/docSite/assets/imgs/image-30.png -- 949.57kb -> 610.28kb (35.73%)
/docSite/assets/imgs/image-39.png -- 157.46kb -> 103.23kb (34.44%)
/docSite/assets/imgs/image-31.png -- 152.24kb -> 100.19kb (34.19%)
/docSite/assets/imgs/image-32.png -- 202.03kb -> 133.60kb (33.87%)
/docSite/assets/imgs/image-40.png -- 190.04kb -> 125.73kb (33.84%)
/docSite/assets/imgs/image-20.png -- 156.46kb -> 103.55kb (33.82%)
/docSite/assets/imgs/image-48.png -- 310.79kb -> 207.13kb (33.35%)
/docSite/assets/imgs/image-42.png -- 281.93kb -> 188.72kb (33.06%)
/docSite/assets/imgs/image-25.png -- 320.31kb -> 216.69kb (32.35%)
/docSite/assets/imgs/image-29.png -- 366.64kb -> 251.01kb (31.54%)
/docSite/assets/imgs/image-37.png -- 195.95kb -> 134.56kb (31.33%)
/docSite/assets/imgs/image-44.png -- 197.77kb -> 136.19kb (31.13%)
/docSite/assets/imgs/image-28.png -- 320.12kb -> 221.57kb (30.79%)
/docSite/assets/imgs/image-26.png -- 357.81kb -> 251.20kb (29.79%)
/docSite/assets/imgs/image-38.png -- 205.90kb -> 144.59kb (29.77%)
/docSite/assets/imgs/image-49.png -- 118.70kb -> 83.41kb (29.73%)
/docSite/assets/imgs/image-47.png -- 250.87kb -> 177.99kb (29.05%)
/docSite/assets/imgs/image-50.png -- 248.29kb -> 176.23kb (29.02%)
/docSite/assets/imgs/image-41.png -- 351.94kb -> 250.54kb (28.81%)
/docSite/assets/imgs/image-34.png -- 60.95kb -> 43.46kb (28.71%)
/docSite/assets/imgs/image-43.png -- 190.00kb -> 135.54kb (28.66%)
/docSite/assets/imgs/image-46.png -- 249.17kb -> 177.94kb (28.59%)
/docSite/assets/imgs/image-36.png -- 153.27kb -> 113.29kb (26.08%)
/docSite/assets/imgs/image-27.png -- 488.49kb -> 367.54kb (24.76%)
/docSite/assets/imgs/image-24.png -- 72.54kb -> 57.77kb (20.35%)
/docSite/assets/imgs/image-23.png -- 113.25kb -> 91.34kb (19.34%)
/docSite/assets/imgs/image-35.png -- 78.37kb -> 63.56kb (18.9%)
/docSite/assets/imgs/image-33.png -- 79.92kb -> 65.38kb (18.2%)
/docSite/assets/imgs/dingtalk-bot-8.png -- 129.33kb -> 112.41kb (13.08%)
/docSite/assets/imgs/dingtalk-bot-2.png -- 158.93kb -> 141.03kb (11.26%)
/docSite/assets/imgs/dingtalk-bot-6.png -- 108.22kb -> 96.11kb (11.19%)
/docSite/assets/imgs/dingtalk-bot-5.png -- 168.14kb -> 152.32kb (9.41%)
/docSite/assets/imgs/dingtalk-bot-1.png -- 91.40kb -> 82.86kb (9.35%)
/docSite/assets/imgs/searxng_plugin_guide1.png -- 338.63kb -> 323.95kb (4.33%)
/docSite/assets/imgs/dingtalk-bot-4.png -- 314.37kb -> 313.01kb (0.43%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
2024-12-20 19:40:04 +08:00
Archer
87e7c23da4 4.8.16 test (#3445)
* perf: model selector ux

* perf: model selector ux
2024-12-20 19:38:20 +08:00
Archer
e6d53e3daa 4.8.16 test (#3442)
* perf: simple app save

* fix: notify config i18n

* perf: service side props render

* perf: model selector

* update doc
2024-12-20 18:58:40 +08:00
Archer
922cb433d3 perf: pay ui;update version doc (#3439)
* perf: pay ui

* update doc
2024-12-19 17:54:56 +08:00
Archer
a997f277ad 4.8.16 test (#3437)
* perf: auto login code

* perf: invoice phone
2024-12-19 14:52:19 +08:00
papapatrick
1f4e5f6d71 perf: add contact phone number in invoice header (#3427) 2024-12-19 14:01:07 +08:00
heheer
ce2e926d76 fix: add sso auto login config (#3436) 2024-12-19 13:33:56 +08:00
439 changed files with 6100 additions and 2844 deletions

View File

@@ -58,9 +58,9 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
- [x] 多库复用,混用
- [x] chunk 记录修改和删除
- [x] 支持手动输入直接分段QA 拆分导入
- [x] 支持 txtmdhtmlpdfdocxpptxcsvxlsx (有需要更多可 PR file loader)
- [x] 支持 url 读取、CSV 批量导入
- [x] 支持 txtmdhtmlpdfdocxpptxcsvxlsx (有需要更多可 PR file loader),支持 url 读取、CSV 批量导入
- [x] 混合检索 & 重排
- [x] API 知识库
- [ ] 自定义文件读取服务
- [ ] 自定义分块服务
@@ -69,7 +69,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
- [x] 对话时反馈引用并可修改与删除
- [x] 完整上下文呈现
- [x] 完整模块中间值呈现
- [x] 高级编排 DeBug 模式
- [ ] 高级编排 DeBug 模式
`4` OpenAPI 接口
- [x] completions 接口 (chat 模式对齐 GPT 接口)
@@ -104,7 +104,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
* [快速开始本地开发](https://doc.tryfastgpt.ai/docs/development/intro/)
* [部署 FastGPT](https://doc.tryfastgpt.ai/docs/development/sealos/)
* [系统配置文件说明](https://doc.tryfastgpt.ai/docs/development/configuration/)
* [多模型配置](https://doc.tryfastgpt.ai/docs/development/one-api/)
* [多模型配置方案](https://doc.tryfastgpt.ai/docs/development/modelconfig/one-api/)
* [版本更新/升级介绍](https://doc.tryfastgpt.ai/docs/development/upgrading/)
* [OpenAPI API 文档](https://doc.tryfastgpt.ai/docs/development/openapi/)
* [知识库结构详解](https://doc.tryfastgpt.ai/docs/guide/knowledge_base/rag/)
@@ -127,7 +127,6 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
我们正在寻找志同道合的小伙伴,加速 FastGPT 的发展。你可以通过 [FastGPT 2025 招聘](https://fael3z0zfze.feishu.cn/wiki/P7FOwEmPziVcaYkvVaacnVX1nvg)了解 FastGPT 的招聘信息。
## 💪 相关项目
- [Laf3 分钟快速接入三方应用](https://github.com/labring/laf)
@@ -139,19 +138,21 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
</a>
## 👀 其他
- [保姆级 FastGPT 教程](https://www.bilibili.com/video/BV1n34y1A7Bo/?spm_id_from=333.999.0.0)
- [接入飞书](https://www.bilibili.com/video/BV1Su4y1r7R3/?spm_id_from=333.999.0.0)
- [接入企微](https://www.bilibili.com/video/BV1Tp4y1n72T/?spm_id_from=333.999.0.0)
## 🌿 第三方生态
- [COW 个人微信/企微机器人](https://doc.tryfastgpt.ai/docs/use-cases/external-integration/onwechat/)
- [SiliconCloud (硅基流动) —— 开源模型在线体验平台](https://cloud.siliconflow.cn/i/TR9Ym0c4)
<a href="#readme">
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
</a>
## 🌿 第三方生态
## 👀 其他
- [COW 个人微信/企微机器人](https://doc.tryfastgpt.ai/docs/use-cases/external-integration/onwechat/)
- [保姆级 FastGPT 教程](https://www.bilibili.com/video/BV1n34y1A7Bo/?spm_id_from=333.999.0.0)
- [接入飞书](https://www.bilibili.com/video/BV1Su4y1r7R3/?spm_id_from=333.999.0.0)
- [接入企微](https://www.bilibili.com/video/BV1Tp4y1n72T/?spm_id_from=333.999.0.0)
<a href="#readme">
<img src="https://img.shields.io/badge/-返回顶部-7d09f1.svg" alt="#" align="right">
@@ -214,4 +215,4 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
1. 允许作为后台服务直接商用,但不允许提供 SaaS 服务。
2. 未经商业授权,任何形式的商用服务均需保留相关版权信息。
3. 完整请查看 [FastGPT Open Source License](./LICENSE)
4. 联系方式Dennis@sealos.io[点击查看商业版定价策略](https://doc.tryfastgpt.ai/docs/commercial)
4. 联系方式Dennis@sealos.io[点击查看商业版定价策略](https://doc.tryfastgpt.ai/docs/shopping_cart/intro/)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 KiB

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 KiB

After

Width:  |  Height:  |  Size: 313 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 KiB

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 320 KiB

After

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 358 KiB

After

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 488 KiB

After

Width:  |  Height:  |  Size: 368 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 320 KiB

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 367 KiB

After

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 950 KiB

After

Width:  |  Height:  |  Size: 610 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 KiB

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 KiB

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 KiB

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 KiB

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 KiB

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 KiB

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 KiB

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 KiB

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 KiB

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 KiB

After

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 KiB

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 339 KiB

After

Width:  |  Height:  |  Size: 324 KiB

View File

@@ -4,7 +4,7 @@ description: 'FastGPT 配置参数介绍'
icon: 'settings'
draft: false
toc: true
weight: 708
weight: 707
---
由于环境变量不利于配置复杂的内容,新版 FastGPT 采用了 ConfigMap 的形式挂载配置文件,你可以在 `projects/app/data/config.json` 看到默认的配置文件。可以参考 [docker-compose 快速部署](/docs/development/docker/) 来挂载配置文件。
@@ -21,16 +21,16 @@ weight: 708
"lafEnv": "https://laf.dev" // laf环境。 https://laf.run (杭州阿里云) ,或者私有化的laf环境。如果使用 Laf openapi 功能,需要最新版的 laf 。
},
"systemEnv": {
"vectorMaxProcess": 15,
"qaMaxProcess": 15,
"vectorMaxProcess": 15, // 向量处理线程数量
"qaMaxProcess": 15, // 问答拆分线程数量
"tokenWorkers": 50, // Token 计算线程保持数,会持续占用内存,不能设置太大。
"pgHNSWEfSearch": 100 // 向量搜索参数。越大搜索越精确但是速度越慢。设置为100有99%+精度。
},
"llmModels": [
{
"provider": "OpenAI", // 模型提供商主要用于分类展示目前已经内置提供商包括https://github.com/labring/FastGPT/blob/main/packages/global/core/ai/provider.ts, 可 pr 提供新的提供商,或直接填写 Other
"model": "gpt-4o-mini", // 模型名(对应OneAPI中渠道的模型名)
"name": "gpt-4o-mini", // 模型别名
"avatar": "/imgs/model/openai.svg", // 模型的logo
"maxContext": 125000, // 最大上下文
"maxResponse": 16000, // 最大回复
"quoteMaxToken": 120000, // 最大引用内容
@@ -38,7 +38,7 @@ weight: 708
"charsPointsPrice": 0, // n积分/1k token商业版
"censor": false, // 是否开启敏感校验(商业版)
"vision": true, // 是否支持图片输入
"datasetProcess": true, // 是否设置为知识库处理模型QA务必保证至少有一个为true否则知识库会报错
"datasetProcess": true, // 是否设置为文本理解模型QA务必保证至少有一个为true否则知识库会报错
"usedInClassify": true, // 是否用于问题分类务必保证至少有一个为true
"usedInExtractFields": true, // 是否用于内容提取务必保证至少有一个为true
"usedInToolCall": true, // 是否用于工具调用务必保证至少有一个为true
@@ -48,12 +48,13 @@ weight: 708
"customCQPrompt": "", // 自定义文本分类提示词(不支持工具和函数调用的模型
"customExtractPrompt": "", // 自定义内容提取提示词
"defaultSystemChatPrompt": "", // 对话默认携带的系统提示词
"defaultConfig": {} // 请求API时挟带一些默认配置比如 GLM4 的 top_p
"defaultConfig": {}, // 请求API时挟带一些默认配置比如 GLM4 的 top_p
"fieldMap": {} // 字段映射o1 模型需要把 max_tokens 映射为 max_completion_tokens
},
{
"provider": "OpenAI",
"model": "gpt-4o",
"name": "gpt-4o",
"avatar": "/imgs/model/openai.svg",
"maxContext": 125000,
"maxResponse": 4000,
"quoteMaxToken": 120000,
@@ -71,14 +72,15 @@ weight: 708
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"defaultConfig": {}
"defaultConfig": {},
"fieldMap": {}
},
{
"provider": "OpenAI",
"model": "o1-mini",
"name": "o1-mini",
"avatar": "/imgs/model/openai.svg",
"maxContext": 125000,
"maxResponse": 4000,
"maxResponse": 65000,
"quoteMaxToken": 120000,
"maxTemperature": 1.2,
"charsPointsPrice": 0,
@@ -95,15 +97,17 @@ weight: 708
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"defaultConfig": {
"temperature": 1
"temperature": 1,
"max_tokens": null,
"stream": false
}
},
{
"provider": "OpenAI",
"model": "o1-preview",
"name": "o1-preview",
"avatar": "/imgs/model/openai.svg",
"maxContext": 125000,
"maxResponse": 4000,
"maxResponse": 32000,
"quoteMaxToken": 120000,
"maxTemperature": 1.2,
"charsPointsPrice": 0,
@@ -120,27 +124,26 @@ weight: 708
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"defaultConfig": {
"temperature": 1
"temperature": 1,
"max_tokens": null,
"stream": false
}
}
],
"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": {} // 参训时的额外参数
"provider": "OpenAI",
"model": "text-embedding-3-small",
"name": "text-embedding-3-small",
"charsPointsPrice": 0,
"defaultToken": 512,
"maxToken": 3000,
"weight": 100
},
{
"provider": "OpenAI",
"model": "text-embedding-3-large",
"name": "text-embedding-3-large",
"avatar": "/imgs/model/openai.svg",
"charsPointsPrice": 0,
"defaultToken": 512,
"maxToken": 3000,
@@ -150,18 +153,22 @@ weight: 708
}
},
{
"model": "text-embedding-3-small",
"name": "text-embedding-3-small",
"avatar": "/imgs/model/openai.svg",
"charsPointsPrice": 0,
"defaultToken": 512,
"maxToken": 3000,
"weight": 100
"provider": "OpenAI",
"model": "text-embedding-ada-002", // 模型名与OneAPI对应
"name": "Embedding-2", // 模型展示名
"charsPointsPrice": 0, // n积分/1k token
"defaultToken": 700, // 默认文本分割时候的 token
"maxToken": 3000, // 最大 token
"weight": 100, // 优先训练权重
"defaultConfig": {}, // 自定义额外参数。例如,如果希望使用 embedding3-large 的话,可以传入 dimensions:1024来返回1024维度的向量。目前必须小于1536维度
"dbConfig": {}, // 存储时的额外参数(非对称向量模型时候需要用到)
"queryConfig": {} // 参训时的额外参数
}
],
"reRankModels": [],
"audioSpeechModels": [
{
"provider": "OpenAI",
"model": "tts-1",
"name": "OpenAI TTS1",
"charsPointsPrice": 0,
@@ -176,6 +183,7 @@ weight: 708
}
],
"whisperModel": {
"provider": "OpenAI",
"model": "whisper-1",
"name": "Whisper1",
"charsPointsPrice": 0
@@ -183,29 +191,66 @@ weight: 708
}
```
## 关于模型 logo
## 内置的模型提供商ID
统一放置在项目的`public/imgs/model/xxx`目录中目前内置了以下几种如果有需要可以PR增加。默认logo为 Hugging face 的 logo~
为了方便模型分类展示FastGPT 内置了部分模型提供商的名字和 Logo。如果你期望补充提供商可[提交 Issue](https://github.com/labring/FastGPT/issues),并提供几个信息:
- /imgs/model/baichuan.svg - 百川智能
- /imgs/model/chatglm.svg - 智谱清言
- /imgs/model/claude.svg - claude
- /imgs/model/deepseek.svg - deepseek
- /imgs/model/doubao.svg - 火山豆包
- /imgs/model/ernie.svg - 文心一言
- /imgs/model/gemini.svg - gemini
- /imgs/model/huggingface.svg - Hugging face【默认logo】
- /imgs/model/minimax.svg - minimax
- /imgs/model/moonshot.svg - 月之暗面
- /imgs/model/openai.svg - OpenAI GPT
- /imgs/model/qwen.svg - 通义千问
- /imgs/model/sparkDesk.svg - 讯飞星火
- /imgs/model/yi.svg - 零一万物
- /imgs/model/hunyuan.svg - 腾讯混元
1. 厂商官网地址
2. 厂商 SVG logo建议是正方形图片。
## 特殊模型
目前已支持的提供商, 复制 "-" 之前的字符串,作为 provider 的值。
### ReRank 接入(私有部署)
- OpenAI
- Claude
- Gemini
- Meta
- MistralAI
- AliCloud - 阿里云
- Qwen - 通义千问
- Doubao - 豆包
- ChatGLM - 智谱
- DeepSeek - 深度求索
- Moonshot - 月之暗面
- MiniMax
- SparkDesk - 讯飞星火
- Hunyuan - 腾讯混元
- Baichuan - 百川
- Yi - 零一万物
- Ernie - 文心一言
- StepFun - 阶跃星辰
- Ollama
- BAAI - 智源研究院
- FishAudio
- Other - 其他
## ReRank 模型接入
由于 OneAPI 不支持 Rerank 模型,所以需要单独配置接入,这里
### 使用硅基流动的在线模型
有免费的 `bge-reranker-v2-m3` 模型可以使用。
1. [点击注册硅基流动账号](https://cloud.siliconflow.cn/i/TR9Ym0c4)
2. 进入控制台,获取 API key: https://cloud.siliconflow.cn/account/ak
3. 修改 FastGPT 配置文件
```json
{
"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"
}
]
}
```
### 私有部署模型
请使用 4.6.6-alpha 以上版本,配置文件中的 `reRankModels` 为重排模型虽然是数组不过目前仅有第1个生效。
@@ -226,44 +271,3 @@ weight: 708
]
}
```
### ReRank 接入(硅基流动)
有免费的 `bge-reranker-v2-m3` 模型可以使用。
1. 注册硅基流动账号: https://siliconflow.cn/
2. 进入控制台,获取 API key: https://cloud.siliconflow.cn/account/ak
3. 修改 FastGPT 配置文件
```json
{
"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"
}
]
}
```
### ReRank 接入Cohere
这个重排模型对中文不是很好,不如 bge 的好用。
1. 申请 Cohere 官方 Key: https://dashboard.cohere.com/api-keys
2. 修改 FastGPT 配置文件
```json
{
"reRankModels": [
{
"model": "rerank-multilingual-v2.0", // 这里的model需要对应 cohere 的模型名
"name": "rerank-multilingual-v2.0",
"requestUrl": "https://api.cohere.ai/v1/rerank",
"requestAuth": "Coherer上申请的key"
}
]
}
```

View File

@@ -23,7 +23,7 @@ FastGPT 默认使用了 OpenAI 的 LLM 模型和向量模型,如果想要私
也可以通过环境变量引入sk-key。有关docker环境变量引入的方法请自寻教程此处不再赘述。
```
## 接入 [One API](/docs/development/one-api/)
## 接入 [One API](/docs/development/modelconfig/one-api/)
为 chatglm2 和 m3e-large 各添加一个渠道,参数如下:

View File

@@ -102,7 +102,7 @@ xinference launch -n qwen-chat -s 14 -f pytorch
## 将本地模型接入 One API
One API 的部署和接入请参考[这里](/docs/development/one-api/)。
One API 的部署和接入请参考[这里](/docs/development/modelconfig/one-api/)。
为 qwen1.5-chat 添加一个渠道,这里的 Base URL 需要填 Xinference 服务的端点,并且注册 qwen-chat (模型的 UID) 。

View File

@@ -192,7 +192,7 @@ docker restart oneapi
可以通过`ip:3001`访问OneAPI默认账号为`root`密码为`123456`
在OneApi中添加合适的AI模型渠道。[点击查看相关教程](/docs/development/one-api/)
在OneApi中添加合适的AI模型渠道。[点击查看相关教程](/docs/development/modelconfig/one-api/)
### 5. 访问 FastGPT

View File

@@ -1,5 +1,5 @@
---
weight: 749
weight: 740
title: "私有部署常见问题"
description: "FastGPT 私有部署常见问题"
icon: upgrade

View File

@@ -0,0 +1,8 @@
---
weight: 745
title: '模型配置方案'
description: '本模型配置方案'
icon: 'code_blocks'
draft: false
images: []
---

View File

@@ -0,0 +1,189 @@
---
title: '通过 OneAPI 接入模型'
description: '通过 OneAPI 接入模型'
icon: 'api'
draft: false
toc: true
weight: 745
---
FastGPT 目前采用模型分离的部署方案FastGPT 中只兼容 OpenAI 的模型规范OpenAI 不存在的模型采用一个较为通用的规范),并通过 [One API](https://github.com/songquanpeng/one-api) 来实现对不同模型接口的统一。
[One API](https://github.com/songquanpeng/one-api) 是一个 OpenAI 接口管理 & 分发系统,可以通过标准的 OpenAI API 格式访问所有的大模型,开箱即用。
## FastGPT 与 One API 关系
可以把 One API 当做一个网关FastGPT 与 One API 关系:
![](/imgs/sealos-fastgpt.webp)
## 部署
### Docker 版本
`docker-compose.yml` 文件已加入了 OneAPI 配置,可直接使用。默认暴露在 3001 端口。
### Sealos 版本
* 北京区: [点击部署 OneAPI](https://hzh.sealos.run/?openapp=system-template%3FtemplateName%3Done-api)
* 新加坡区(可用 GPT) [点击部署 OneAPI](https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Done-api)
![alt text](/imgs/image-59.png)
部署完后,可以打开 OneAPI 访问链接,进行下一步操作。
## OneAPI 基础教程
### 概念
1. 渠道:
1. OneApi 中一个渠道对应一个 `Api Key`,这个 `Api Key` 可以是GPT、微软、ChatGLM、文心一言的。一个`Api Key`通常可以调用同一个厂商的多个模型。
2. One API 会根据请求传入的`模型`来决定使用哪一个`渠道`,如果一个模型对应了多个`渠道`,则会随机调用。
2. 令牌:访问 One API 所需的凭证,只需要这`1`个凭证即可访问`One API`上配置的模型。因此`FastGPT`中,只需要配置`One API``baseurl``令牌`即可。令牌不要设置任何的模型范围权限,否则容易报错。
![alt text](/imgs/image-60.png)
### 大致工作流程
1. 客户端请求 One API
2. 根据请求中的 `model` 参数,匹配对应的渠道(根据渠道里的模型进行匹配,必须完全一致)。如果匹配到多个渠道,则随机选择一个(同优先级)。
3. One API 向真正的地址发出请求。
4. One API 将结果返回给客户端。
### 1. 登录 One API
![step5](/imgs/oneapi-step5.png)
### 2. 创建渠道
在 One API 中添加对应渠道,直接点击 【添加基础模型】不要遗漏了向量模型Embedding
![step6](/imgs/oneapi-step6.png)
### 3. 创建令牌
| | |
| --- | --- |
| ![step7](/imgs/oneapi-step7.png) | ![alt text](/imgs/image-61.png) |
### 4. 修改账号余额
One API 默认 root 用户只有 200刀可以自行修改编辑。
![alt text](/imgs/image-62.png)
### 5. 修改 FastGPT 的环境变量
有了 One API 令牌后FastGPT 可以通过修改 `baseurl``key` 去请求到 One API再由 One API 去请求不同的模型。修改下面两个环境变量:
```bash
# 务必写上 v1。如果在同一个网络内可改成内网地址。
OPENAI_BASE_URL=https://xxxx.cloud.sealos.io/v1
# 下面的 key 是由 One API 提供的令牌
CHAT_API_KEY=sk-xxxxxx
```
## 接入其他模型
**以添加文心一言为例:**
### 1. OneAPI 新增模型渠道
类型选择百度文心千帆。
![](/imgs/oneapi-demo1.png)
### 2. 修改 FastGPT 配置文件
可以在 `/projects/app/src/data/config.json` 里找到配置文件(本地开发需要复制成 config.local.json,按下面内容修改配置文件,最新/更具体的配置说明,可查看[FastGPT 配置文件说明](/docs/development/configuration)。
配置模型关键点在于`model` 需要与 OneAPI 渠道中的模型一致。
```json
{
"llmModels": [ // 语言模型配置
{
"model": "ERNIE-Bot", // 这里的模型需要对应 One API 的模型
"name": "文心一言", // 对外展示的名称
"avatar": "/imgs/model/openai.svg", // 模型的logo
"maxContext": 16000, // 最大上下文
"maxResponse": 4000, // 最大回复
"quoteMaxToken": 13000, // 最大引用内容
"maxTemperature": 1.2, // 最大温度
"charsPointsPrice": 0,
"censor": false,
"vision": false, // 是否支持图片输入
"datasetProcess": true, // 是否设置为知识库处理模型
"usedInClassify": true, // 是否用于问题分类
"usedInExtractFields": true, // 是否用于字段提取
"usedInToolCall": true, // 是否用于工具调用
"usedInQueryExtension": true, // 是否用于问题优化
"toolChoice": true, // 是否支持工具选择
"functionCall": false, // 是否支持函数调用
"customCQPrompt": "", // 自定义文本分类提示词(不支持工具和函数调用的模型
"customExtractPrompt": "", // 自定义内容提取提示词
"defaultSystemChatPrompt": "", // 对话默认携带的系统提示词
"defaultConfig":{} // 请求API时挟带一些默认配置比如 GLM4 的 top_p
}
],
"vectorModels": [ // 向量模型配置
{
"model": "text-embedding-ada-002",
"name": "Embedding-2",
"avatar": "/imgs/model/openai.svg",
"charsPointsPrice": 0,
"defaultToken": 700,
"maxToken": 3000,
"weight": 100
},
]
}
```
### 3. 重启 FastGPT
**Docker 版本**
```bash
docker-compose down
docker-compose up -d
```
**Sealos 版本**
直接找到 FastGPT 服务,点击重启即可。
## 其他服务商接入参考
这章介绍一些提供商接入 OneAPI 的教程,配置后不要忘记修改 FastGPT 配置文件。
### 阿里通义千问
千问目前已经兼容 GPT 格式,可以直接选择 OpenAI 类型来接入即可。如下图,选择类型为`OpenAI`,代理填写阿里云的代理地址。
目前可以直接使用阿里云的语言模型和 `text-embedding-v3` 向量模型(实测已经归一化,可直接使用)
![alt text](/imgs/image-63.png)
### 硅基流动 —— 开源模型大合集
[硅基流动](https://cloud.siliconflow.cn/i/TR9Ym0c4) 是一个专门提供开源模型调用平台,并拥有自己的加速引擎。模型覆盖面广,非常适合低成本来测试开源模型。接入教程:
1. [点击注册硅基流动账号](https://cloud.siliconflow.cn/i/TR9Ym0c4)
2. 进入控制台,获取 API key: https://cloud.siliconflow.cn/account/ak
3. 新增 OneAPI 渠道,选择`OpenAI`类型,代理填写:`https://api.siliconflow.cn`,密钥是第二步创建的密钥。
![alt text](/imgs/image-64.png)
由于 OneAPI 未内置 硅基流动 的模型名,可以通过自定义模型名称来填入,下面是获取模型名称的教程:
1. 打开[硅基流动模型列表](https://siliconflow.cn/zh-cn/models)
2. 单击模型后,会打开模型详情。
3. 复制模型名到 OneAPI 中。
| | | |
| --- | --- | --- |
| ![alt text](/imgs/image-65.png) | ![alt text](/imgs/image-66.png)| ![alt text](/imgs/image-67.png) |

View File

@@ -0,0 +1,220 @@
---
title: '通过 SiliconCloud 体验开源模型'
description: '通过 SiliconCloud 体验开源模型'
icon: 'api'
draft: false
toc: true
weight: 746
---
[SiliconCloud(硅基流动)](https://cloud.siliconflow.cn/i/TR9Ym0c4) 是一个以提供开源模型调用为主的平台并拥有自己的加速引擎。帮助用户低成本、快速的进行开源模型的测试和使用。实际体验下来他们家模型的速度和稳定性都非常不错并且种类丰富覆盖语言、向量、重排、TTS、STT、绘图、视频生成模型可以满足 FastGPT 中所有模型需求。
如果你想部分模型使用 SiliconCloud 的模型,可额外参考[OneAPI接入硅基流动](/docs/development/modelconfig/one-api/#硅基流动--开源模型大合集)。
本文会介绍完全使用 SiliconCloud 模型来部署 FastGPT 的方案。
## 1. 注册 SiliconCloud 账号
1. [点击注册硅基流动账号](https://cloud.siliconflow.cn/i/TR9Ym0c4)
2. 进入控制台,获取 API key: https://cloud.siliconflow.cn/account/ak
## 2. 修改 FastGPT 环境变量
```bash
OPENAI_BASE_URL=https://api.siliconflow.cn/v1
# 填写 SiliconCloud 控制台提供的 Api Key
CHAT_API_KEY=sk-xxxxxx
```
## 3. 修改 FastGPT 配置文件
我们选取 SiliconCloud 中的模型作为 FastGPT 配置。这里配置了 `Qwen2.5 72b` 的纯语言和视觉模型;选择 `bge-m3` 作为向量模型;选择 `bge-reranker-v2-m3` 作为重排模型。选择 `fish-speech-1.5` 作为语音模型;选择 `SenseVoiceSmall` 作为语音输入模型。
注意ReRank 模型仍需配置一次 Api Key
```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. 体验测试
### 测试对话和图片识别
随便新建一个简易应用,选择对应模型,并开启图片上传后进行测试:
| | |
| --- | --- |
| ![alt text](/imgs/image-68.png) | ![alt text](/imgs/image-70.png) |
可以看到72B 的模型,性能还是非常快的,这要是本地没几个 4090不说配置环境输出怕都要 30s 了。
### 测试知识库导入和知识库问答
新建一个知识库(由于只配置了一个向量模型,页面上不会展示向量模型选择)
| | |
| --- | --- |
| ![alt text](/imgs/image-72.png) | ![alt text](/imgs/image-71.png) |
导入本地文件直接选择文件然后一路下一步即可。79 个索引,大概花了 20s 的时间就完成了。现在我们去测试一下知识库问答。
首先回到我们刚创建的应用,选择知识库,调整一下参数后即可开始对话:
| | | |
| --- | --- | --- |
| ![alt text](/imgs/image-73.png) | ![alt text](/imgs/image-75.png) | ![alt text](/imgs/image-76.png) |
对话完成后,点击底部的引用,可以查看引用详情,同时可以看到具体的检索和重排得分:
| | |
| --- | --- |
| ![alt text](/imgs/image-77.png) | ![alt text](/imgs/image-78.png) |
### 测试语音播放
继续在刚刚的应用中,左侧配置中找到语音播放,点击后可以从弹窗中选择语音模型,并进行试听:
![alt text](/imgs/image-79.png)
### 测试语言输入
继续在刚刚的应用中,左侧配置中找到语音输入,点击后可以从弹窗中开启语言输入
![alt text](/imgs/image-80.png)
开启后,对话输入框中,会增加一个话筒的图标,点击可进行语音输入:
| | |
| --- | --- |
| ![alt text](/imgs/image-81.png) | ![alt text](/imgs/image-82.png) |
## 总结
如果你想快速的体验开源模型或者快速的使用 FastGPT不想在不同服务商申请各类 Api Key那么可以选择 SiliconCloud 的模型先进行快速体验。
如果你决定未来私有化部署模型和 FastGPT前期可通过 SiliconCloud 进行测试验证,后期再进行硬件采购,减少 POC 时间和成本。

View File

@@ -1,179 +0,0 @@
---
title: '使用 One API 接入 Azure、ChatGLM 和本地模型'
description: '部署和使用 One API实现 Azure、ChatGLM 和本地模型的接入。'
icon: 'api'
draft: false
toc: true
weight: 708
---
* 默认情况下FastGPT 只配置了 GPT 的模型,如果你需要接入其他模型,需要进行一些额外配置。
* [One API](https://github.com/songquanpeng/one-api) 是一个 OpenAI 接口管理 & 分发系统,可以通过标准的 OpenAI API 格式访问所有的大模型,开箱即用。
* FastGPT 可以通过接入 One API 来实现对不同大模型的支持。One API 的部署方法也很简单。
## FastGPT 与 One API 关系
可以把 One API 当做一个网关。
![](/imgs/sealos-fastgpt.webp)
## 部署
### Docker 版本
已加入最新的 `docker-compose.yml` 文件中。
### Sealos - MySQL 版本
MySQL 版本支持多实例,高并发。
直接点击以下按钮即可一键部署 👇
<a href="https://template.cloud.sealos.io/deploy?templateName=one-api" rel="external" target="_blank"><img src="https://cdn.jsdelivr.net/gh/labring-actions/templates@main/Deploy-on-Sealos.svg" alt="Deploy on Sealos"/></a>
部署完后会跳转「应用管理」,数据库在另一个应用「数据库」中。需要等待 1~3 分钟数据库运行后才能访问成功。
### Sealos - SqlLite 版本
SqlLite 版本不支持多实例,适合个人小流量使用,但是价格非常便宜。
**1. [点击打开 Sealos 公有云](https://cloud.sealos.io/)**
**2. 打开 AppLaunchpad(应用管理) 工具**
![step1](/imgs/oneapi-step1.webp)
**3. 点击创建新应用**
**4. 填写对应参数**
镜像ghcr.io/songquanpeng/one-api:latest
![step2](/imgs/oneapi-step2.png)
打开外网访问开关后Sealos 会自动分配一个可访问的地址,不需要自己配置。
![step3](/imgs/oneapi-step3.png)
填写完参数后,点击右上角部署即可。环境变量:
```
SESSION_SECRET=SESSION_SECRET
POLLING_INTERVAL=60
BATCH_UPDATE_ENABLED=true
BATCH_UPDATE_INTERVAL=60
```
## One API 使用教程
### 概念
1. 渠道:
1. OneApi 中一个渠道对应一个 `Api Key`,这个 `Api Key` 可以是GPT、微软、ChatGLM、文心一言的。一个`Api Key`通常可以调用同一个厂商的多个模型。
2. One API 会根据请求传入的`模型`来决定使用哪一个`Key`,如果一个模型对应了多个`Key`,则会随机调用。
2. 令牌:访问 One API 所需的凭证,只需要这`1`个凭证即可访问`One API`上配置的模型。因此`FastGPT`中,只需要配置`One API``baseurl``令牌`即可。
### 大致工作流程
1. 客户端请求 One API
2. 根据请求中的 `model` 参数,匹配对应的渠道(根据渠道里的模型进行匹配,必须完全一致)。如果匹配到多个渠道,则随机选择一个(同优先级)。
3. One API 向真正的地址发出请求。
4. One API 将结果返回给客户端。
### 1. 登录 One API
打开 【One API 应用详情】,找到访问地址:
![step4](/imgs/oneapi-step4.png)
登录 One API
![step5](/imgs/oneapi-step5.png)
### 2. 创建渠道和令牌
在 One API 中添加对应渠道,直接点击 【添加基础模型】不要遗漏了向量模型Embedding
![step6](/imgs/oneapi-step6.png)
创建一个令牌
![step7](/imgs/oneapi-step7.png)
### 3. 修改账号余额
One API 默认 root 用户只有 200刀可以自行修改编辑。
### 4. 修改 FastGPT 的环境变量
有了 One API 令牌后FastGPT 可以通过修改 `baseurl``key` 去请求到 One API再由 One API 去请求不同的模型。修改下面两个环境变量:
```bash
# 下面的地址是 Sealos 提供的,务必写上 v1 两个项目都在 sealos 部署时候https://xxxx.cloud.sealos.io 可以改用内网地址
OPENAI_BASE_URL=https://xxxx.cloud.sealos.io/v1
# 下面的 key 是由 One API 提供的令牌
CHAT_API_KEY=sk-xxxxxx
```
## 接入其他模型
**以添加文心一言为例:**
### 1. One API 添加对应模型渠道
![](/imgs/oneapi-demo1.png)
### 2. 修改 FastGPT 配置文件
可以在 `/projects/app/src/data/config.json` 里找到配置文件(本地开发需要复制成 config.local.json配置文件中有一项是**对话模型配置**
```json
"llmModels": [
...
{
"model": "ERNIE-Bot", // 这里的模型需要对应 One API 的模型
"name": "文心一言", // 对外展示的名称
"avatar": "/imgs/model/openai.svg", // 模型的logo
"maxContext": 16000, // 最大上下文
"maxResponse": 4000, // 最大回复
"quoteMaxToken": 13000, // 最大引用内容
"maxTemperature": 1.2, // 最大温度
"charsPointsPrice": 0,
"censor": false,
"vision": false, // 是否支持图片输入
"datasetProcess": true, // 是否设置为知识库处理模型
"usedInClassify": true, // 是否用于问题分类
"usedInExtractFields": true, // 是否用于字段提取
"usedInToolCall": true, // 是否用于工具调用
"usedInQueryExtension": true, // 是否用于问题优化
"toolChoice": true, // 是否支持工具选择
"functionCall": false, // 是否支持函数调用
"customCQPrompt": "", // 自定义文本分类提示词(不支持工具和函数调用的模型
"customExtractPrompt": "", // 自定义内容提取提示词
"defaultSystemChatPrompt": "", // 对话默认携带的系统提示词
"defaultConfig":{} // 请求API时挟带一些默认配置比如 GLM4 的 top_p
}
...
],
```
**添加向量模型:**
```json
"vectorModels": [
......
{
"model": "text-embedding-ada-002",
"name": "Embedding-2",
"avatar": "/imgs/model/openai.svg",
"charsPointsPrice": 0,
"defaultToken": 700,
"maxToken": 3000,
"weight": 100
},
......
]
```
### 3. 重启 FastGPT
```bash
docker-compose down
docker-compose up -d
```
重启 FastGPT 即可在选择文心一言模型进行对话。**添加向量模型也是类似操作,增加到 `vectorModels`里。**

View File

@@ -1424,7 +1424,11 @@ curl --location --request POST 'https://api.fastgpt.in/api/core/dataset/searchTe
"limit": 5000,
"similarity": 0,
"searchMode": "embedding",
"usingReRank": false
"usingReRank": false,
"datasetSearchUsingExtensionQuery": true,
"datasetSearchExtensionModel": "gpt-4o-mini",
"datasetSearchExtensionBg": ""
}'
```
@@ -1441,6 +1445,9 @@ curl --location --request POST 'https://api.fastgpt.in/api/core/dataset/searchTe
- similarity - 最低相关度0~1可选
- searchMode - 搜索模式embedding | fullTextRecall | mixedRecall
- usingReRank - 使用重排
- datasetSearchUsingExtensionQuery - 使用问题优化
- datasetSearchExtensionModel - 问题优化模型
- datasetSearchExtensionBg - 问题优化背景描述
{{% /alert %}}
{{< /markdownify >}}

View File

@@ -15,7 +15,7 @@ weight: 706
FastGPT 使用了 one-api 项目来管理模型池,其可以兼容 OpenAI 、Azure 、国内主流模型和本地模型等。
可参考:[Sealos 快速部署 OneAPI](/docs/development/one-api)
可参考:[Sealos 快速部署 OneAPI](/docs/development/modelconfig/one-api)
## 一键部署
@@ -163,4 +163,4 @@ SYSTEM_FAVICON 可以是一个网络地址
### One API 使用
[参考 OneAPI 使用步骤](/docs/development/one-api/)
[参考 OneAPI 使用步骤](/docs/development/modelconfig/one-api/)

View File

@@ -1,5 +1,5 @@
---
title: 'V4.8.16(进行中)'
title: 'V4.8.16(更新配置文件)'
description: 'FastGPT V4.8.16 更新说明'
icon: 'upgrade'
draft: false
@@ -7,6 +7,46 @@ toc: true
weight: 808
---
## 更新指南
### 1. 更新镜像:
- 更新 fastgpt 镜像 tag: v4.8.16
- 更新 fastgpt-pro 商业版镜像 tag: v4.8.16
- Sandbox 镜像 tag: v4.8.16
### 2. 更新配置文件
参考最新的[配置文件](/docs/development/configuration/),更新 `config.json` 或 admin 中模型文件配置。给 LLMModel 和 VectorModel 增加 `provider` 字段,以便进行模型分类。例如:
```json
{
"provider": "OpenAI", // 这是新增的
"model": "gpt-4o",
"name": "gpt-4o",
"maxContext": 125000,
"maxResponse": 4000,
"quoteMaxToken": 120000,
"maxTemperature": 1.2,
"charsPointsPrice": 0,
"censor": false,
"vision": true,
"datasetProcess": true,
"usedInClassify": true,
"usedInExtractFields": true,
"usedInToolCall": true,
"usedInQueryExtension": true,
"toolChoice": true,
"functionCall": false,
"customCQPrompt": "",
"customExtractPrompt": "",
"defaultSystemChatPrompt": "",
"defaultConfig": {},
"fieldMap": {}
}
```
## 完整更新内容
@@ -17,13 +57,17 @@ weight: 808
5. 新增 - 商业版支持钉钉 SSO 登录配置。[点击查看教程](/docs/guide/admin/sso_dingtalk/)
6. 新增 - 商业版支持飞书和语雀知识库导入。[点击查看教程](/docs/guide/knowledge_base/lark_dataset/)
7. 新增 - sandbox 新增 createHmac 加密全局方法。
8. 新增 - 工作流右键支持
9. 优化 - 工作流/简易模式变量初始化代码,去除监听初始化,避免因渲染顺序不一致导致的失败
10. 优化 - 工作流获取数据类型不一致数据时,增加类型转化,避免 undefined
11. 修复 - 无法自动切换默认语言。增加分享链接,强制执行一次切换默认语言
12. 修复 - 数组选择器自动兼容 4.8.13 以前的数据
13. 修复 - 站点同步知识库,链接同步时未使用选择器
14. 修复 - 简易模式转工作流,没有把系统配置项转化
15. 修复 - 插件独立运行,变量初始值未赋上
16. 修复 - 工作流使用弹窗组件时,关闭弹窗后,有时候会出现页面偏移
17. 修复 - 插件调试时,日志未保存插件输入参数。
8. 新增 - 工作流右键支持全部折叠。
9. 优化 - 模型选择器
10. 优化 - SSR 渲染,预判断是移动端还是 pc 端,减少页面抖动
11. 优化 - 工作流/简易模式变量初始化代码,去除监听初始化,避免因渲染顺序不一致导致的失败
12. 优化 - 工作流获取数据类型不一致数据时,增加类型转化,避免 undefined
13. 修复 - 无法自动切换默认语言。增加分享链接,强制执行一次切换默认语言
14. 修复 - 数组选择器自动兼容 4.8.13 以前的数据
15. 修复 - 站点同步知识库,链接同步时未使用选择器
16. 修复 - 简易模式转工作流,没有把系统配置项转化
17. 修复 - 插件独立运行,变量初始值未赋上。
18. 修复 - 工作流使用弹窗组件时,关闭弹窗后,有时候会出现页面偏移。
19. 修复 - 插件调试时,日志未保存插件输入参数。
20. 修复 - 部分模板市场模板
21. 修复 - 设置NEXT_PUBLIC_BASE_URL时图片文件读取URL不正确

View File

@@ -0,0 +1,52 @@
---
title: 'V4.8.17(包含升级脚本)'
description: 'FastGPT V4.8.17 更新说明'
icon: 'upgrade'
draft: false
toc: true
weight: 807
---
## 更新指南
### 1. 更新镜像:
- 更新 fastgpt 镜像 tag: v4.8.17
- 更新 fastgpt-pro 商业版镜像 tag: v4.8.17
- Sandbox 镜像无需更新
### 2. 运行升级脚本
从任意终端,发起 1 个 HTTP 请求。其中 {{rootkey}} 替换成环境变量里的 `rootkey`{{host}} 替换成**FastGPT 域名**。
```bash
curl --location --request POST 'https://{{host}}/api/admin/initv4817' \
--header 'rootkey: {{rootkey}}' \
--header 'Content-Type: application/json'
```
会将用户绑定的 OpenAI 账号移动到团队中。
## 调整 completions 接口返回值
/api/v1/chat/completions 接口返回值调整,对话节点、工具节点等使用到模型的节点,将不再返回 `tokens` 字段,改为返回 `inputTokens``outputTokens` 字段,分别表示输入和输出的 Token 数量。
## 完整更新内容
1. 新增 - 简易模式工具调用支持数组类型插件。
2. 新增 - 工作流增加异常离开自动保存,避免工作流丢失。
3. 新增 - LLM 模型参数支持关闭 max_tokens 和 temperature。
4. 新增 - 商业版支持后台配置模板市场。
5. 新增 - 商业版支持后台配置自定义工作流变量,用于与业务系统鉴权打通。
6. 新增 - 搜索测试接口支持问题优化。
7. 新增 - 工作流中 Input Token 和 Output Token 分开记录展示。并修复部分请求未记录输出 Token 计费问题。
8. 优化 - Markdown 大小测试,超出 20 万字符不使用 Markdown 组件,避免崩溃。
9. 优化 - 知识库搜索参数,滑动条支持输入模式,可以更精准的控制。
10. 优化 - 可用模型展示UI。
11. 优化 - Mongo 查询语句,增加 virtual 字段。
12. 修复 - 文件返回接口缺少 Content-Length 头,导致通过非同源文件上传时,阿里 vision 模型无法识别图片。
13. 修复 - 去除判断器两端字符串隐藏换行符,避免判断器失效。
14. 修复 - 变量更新节点,手动输入更新内容时候,非字符串类型数据类型无法自动转化。
15. 修复 - 豆包模型无法工具调用。

View File

@@ -11,11 +11,14 @@ weight: 104
| | | |
| --- | --- | --- |
| ![](/imgs/aichat0.png) | ![](/imgs/aichat02.png) | ![](/imgs/aichat2.png) |
| ![alt text](/imgs/image-51.png) | ![alt text](/imgs/image-52.png) | ![alt text](/imgs/image-53.png) |
## 返回AI内容高级编排特有)
## 流响应(高级编排 AI 对话 特有)
这是一个开关,打开的时候,当 AI 对话模块运行时会将其输出的内容返回到浏览器API响应如果关闭AI 输出的内容不会返回到浏览器但是生成的内容仍可以通过【AI回复】进行输出。你可以将【AI回复】连接到其他模块中
旧版名字叫做:返回 AI 内容;新版改名:流响应
这是一个开关,打开的时候,当 AI 对话模块运行时会将其输出的内容返回到浏览器API响应
如果关闭,会强制使用非流模式调用模型,并且 AI 输出的内容不会返回到浏览器但是生成的内容仍可以通过【AI回复】进行输出。你可以将【AI回复】连接到其他模块中进行二次使用。
### 最大上下文
@@ -33,13 +36,25 @@ weight: 104
最大回复 token 数量。注意是回复的Tokens不是上下文 tokens。
通常,回复上限=min(模型允许的最大回复上限, 最大上下文-已用上下文)
所以,一般配置模型时,不会把最大上下文配置成模型实际最大上下文,而是预留预定空间给回答,例如 128k 模型,可以配置 max_context=115000
### 系统提示词
被放置在上下文数组的最前面role 为 system用于引导模型。
### 记忆轮数(仅简易模式)
可以配置模型支持的记忆轮数,如果模型的超出上下文,系统会自动截断,尽可能保证不超模型上下文。
所以尽管配置 30 轮对话,实际运行时候,不一定会达到 30 轮。
## 引用模板 & 引用提示词
这两个参数与知识库问答场景相关,可以控制知识库相关的提示词
进行知识库搜索后,你可以自定义组织检索结果构成的提示词,这个配置,仅工作流中 AI 对话节点可用。并且,只会在有引用知识库内容时才会生效
![alt text](/imgs/image-54.png)
### AI 对话消息组成

View File

@@ -45,7 +45,7 @@ FastGPT 从 V4 版本开始采用新的交互方式来构建 AI 应用。使用
## 重点 - 工作流是如何运行的
FastGPT的工作流从【流程开始】节点开始执行可以理解为从用户输入问题开始没有**固定的出口**,是以节点运行结束作为出口,如果在一个轮调用中,所有节点都不再允许,则工作流结束。
FastGPT的工作流从【流程开始】节点开始执行可以理解为从用户输入问题开始没有**固定的出口**,是以节点运行结束作为出口,如果在一个轮调用中,所有节点都不再运行,则工作流结束。
下面我们来看下,工作流是如何运行的,以及每个节点何时被触发执行。

View File

@@ -19,7 +19,7 @@ weight: 232
## AI模型
可以通过 [config.json](/docs/development/configuration/) 配置可选的对话模型,通过 [one-api](/docs/development/one-api/) 来实现多模型接入。
可以通过 [config.json](/docs/development/configuration/) 配置可选的对话模型,通过 [one-api](/docs/development/modelconfig/one-api/) 来实现多模型接入。
点击AI模型后可以配置模型的相关参数。

View File

@@ -58,7 +58,7 @@ weight: 236
#### 用途
默认清空工具调用节点在决定调用工具后会将工具运行的结果返回给AI让 AI 对工具运行的结果进行总结输出。有时候,如果你不需要 AI 进行进一步的总结输出,可以使用该节点,将其接入对于工具流程的末尾。
默认情况工具调用节点在决定调用工具后会将工具运行的结果返回给AI让 AI 对工具运行的结果进行总结输出。有时候,如果你不需要 AI 进行进一步的总结输出,可以使用该节点,将其接入对于工具流程的末尾。
如下图,在执行知识库搜索后,发送给了 HTTP 请求,搜索将不会返回搜索的结果给工具调用进行 AI 总结。

View File

@@ -19,17 +19,20 @@ FastGPT 商业版是基于 FastGPT 开源版的增强版本,增加了一些独
| 应用管理与高级编排 | ✅ | ✅ | ✅ |
| 文档知识库 | ✅ | ✅ | ✅ |
| 外部使用 | ✅ | ✅ | ✅ |
| API 知识库 | ✅ | ✅ | ✅ |
| 最大应用数量 | 500 | 无限制 | 由付费套餐决定 |
| 最大知识库数量(单个知识库内容无限制) | 30 | 无限制 | 由付费套餐决定 |
| 自定义版权信息 | ❌ | ✅ | 设计中 |
| 多租户与支付 | ❌ | ✅ | ✅ |
| 团队空间 | ❌ | ✅ | ✅ |
| 团队空间 & 权限 | ❌ | ✅ | ✅ |
| 应用发布安全配置 | ❌ | ✅ | ✅ |
| 内容审核 | ❌ | ✅ | ✅ |
| web站点同步 | ❌ | ✅ | ✅ |
| 管理后台 | ❌ | ✅ | 不需要 |
| 主流文档库接入(目前支持:语雀、飞书) | ❌ | ✅ | |
| 增强训练模式 | ❌ | ✅ | ✅ |
| 第三方应用快速接入(飞书、公众号) | ❌ | ✅ | ✅ |
| 管理后台 | ❌ | ✅ | 不需要 |
| SSO 登录可自定义也可使用内置Github、公众号、钉钉、谷歌等 | ❌ | ✅ | 不需要 |
| 图片知识库 | ❌ | 设计中 | 设计中 |
| 对话日志运营分析 | ❌ | 设计中 | 设计中 |
| 完整商业授权 | ❌ | ✅ | ✅ |
@@ -50,8 +53,8 @@ FastGPT 商业版软件根据不同的部署方式,分为 3 类收费模式。
{{< table "table-hover table-striped-columns" >}}
| 部署方式 | 特有服务 | 上线时长 | 标品价格 |
| ---- | ---- | ---- | ---- |
| Sealos全托管 | 1. 有效期内免费升级。<br>2. 免运维服务&数据库。 | 半天 | 5000元起/月3个月起<br>或<br>50000元起/年 |
| 自有服务器部署 | 1. 6个版本的升级服务。 | 14天内 | 具体价格可[联系咨询](https://fael3z0zfze.feishu.cn/share/base/form/shrcnRxj3utrzjywsom96Px4sud) |
| Sealos全托管 | 1. 有效期内免费升级。<br>2. 免运维服务&数据库。 | 半天 | 6000元起/月3个月起<br>或<br>60000元起/年 |
| 自有服务器部署 | 1. 6个版本免费升级支持。 | 14天内 | 具体价格可[联系咨询](https://fael3z0zfze.feishu.cn/share/base/form/shrcnRxj3utrzjywsom96Px4sud) |
{{< /table >}}
{{% alert icon="🤖 " context="success" %}}
@@ -62,6 +65,10 @@ FastGPT 商业版软件根据不同的部署方式,分为 3 类收费模式。
- 高可用版适合对外提供在线服务,包含可视化监控、多副本、负载均衡、数据库自动备份等生产环境的基础设施。
{{% /alert %}}
## 联系方式
请填写[咨询问卷](https://fael3z0zfze.feishu.cn/share/base/form/shrcnRxj3utrzjywsom96Px4sud),我们会尽快与您联系。
## 技术支持
@@ -79,9 +86,6 @@ FastGPT 商业版软件根据不同的部署方式,分为 3 类收费模式。
跨版本更新或复杂更新可参考文档自行更新;或付费支持,标准与技术服务费一致。
## 联系方式
请填写[咨询问卷](https://fael3z0zfze.feishu.cn/share/base/form/shrcnRxj3utrzjywsom96Px4sud),我们会尽快与您联系。
## QA
@@ -95,8 +99,14 @@ FastGPT 商业版软件根据不同的部署方式,分为 3 类收费模式。
可以修改开源版部分代码,不支持修改商业版镜像。完整版本=开源版+商业版镜像,所以是可以修改部分内容的。但是如果二开了,后续则需要自己进行代码合并升级。
## Sealos 费用
### Sealos 运行费用
Sealos 云服务属于按量计费,下面是它的价格表:
![](/imgs/sealos_price.jpg)
![alt text](/imgs/image-58.png)
## 管理后台部分截图
| | | |
| ---- | ---- | ---- |
| ![alt text](/imgs/image-55.png) | ![alt text](/imgs/image-56.png) | ![alt text](/imgs/image-57.png) |

View File

@@ -17,9 +17,11 @@ weight: 506
![图片](/imgs/offiaccount-1.png)
## 2. 登录微信公众平台,获取 AppID 、 Secret和Token
## 2. 获取 AppID 、 Secret和Token
### 1. https://mp.weixin.qq.com 登录微信公众平台,选择您的公众号。
### 1. 登录微信公众平台,选择您的公众号。
打开微信公众号官网https://mp.weixin.qq.com
**只支持通过验证的公众号,未通过验证的公众号暂不支持。**
@@ -28,6 +30,7 @@ weight: 506
![图片](/imgs/offiaccount-2.png)
### 2. 把3个参数填入 FastGPT 配置弹窗中。
![图片](/imgs/offiaccount-3.png)
## 3. 在 IP 白名单中加入 FastGPT 的 IP
@@ -36,7 +39,7 @@ weight: 506
私有部署的用户可自行查阅自己的 IP 地址。
海外版用户cloud.tryfastgpt.ai)可以填写下面的 IP 白名单:
海外版用户cloud.tryfastgpt.ai可以填写下面的 IP 白名单:
```
35.240.227.100

View File

@@ -114,15 +114,15 @@ services:
# fastgpt
sandbox:
container_name: sandbox
image: ghcr.io/labring/fastgpt-sandbox:v4.8.15 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.8.15 # 阿里云
image: ghcr.io/labring/fastgpt-sandbox:v4.8.17 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.8.17 # 阿里云
networks:
- fastgpt
restart: always
fastgpt:
container_name: fastgpt
image: ghcr.io/labring/fastgpt:v4.8.15-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix2 # 阿里云
image: ghcr.io/labring/fastgpt:v4.8.17 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.17 # 阿里云
ports:
- 3000:3000
networks:

View File

@@ -72,15 +72,15 @@ services:
# fastgpt
sandbox:
container_name: sandbox
image: ghcr.io/labring/fastgpt-sandbox:v4.8.15 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.8.15 # 阿里云
image: ghcr.io/labring/fastgpt-sandbox:v4.8.17 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.8.17 # 阿里云
networks:
- fastgpt
restart: always
fastgpt:
container_name: fastgpt
image: ghcr.io/labring/fastgpt:v4.8.15-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix2 # 阿里云
image: ghcr.io/labring/fastgpt:v4.8.17 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.17 # 阿里云
ports:
- 3000:3000
networks:

View File

@@ -53,15 +53,15 @@ services:
wait $$!
sandbox:
container_name: sandbox
image: ghcr.io/labring/fastgpt-sandbox:v4.8.15 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.8.15 # 阿里云
image: ghcr.io/labring/fastgpt-sandbox:v4.8.17 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-sandbox:v4.8.17 # 阿里云
networks:
- fastgpt
restart: always
fastgpt:
container_name: fastgpt
image: ghcr.io/labring/fastgpt:v4.8.15-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix2 # 阿里云
image: ghcr.io/labring/fastgpt:v4.8.17 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.17 # 阿里云
ports:
- 3000:3000
networks:

View File

@@ -2,3 +2,5 @@ export const HUMAN_ICON = `/icon/human.svg`;
export const LOGO_ICON = `/icon/logo.svg`;
export const HUGGING_FACE_ICON = `/imgs/model/huggingface.svg`;
export const DEFAULT_TEAM_AVATAR = `/imgs/avatar/defaultTeamAvatar.svg`;
export const isProduction = process.env.NODE_ENV === 'production';

View File

@@ -5,7 +5,7 @@ import type {
LLMModelItemType,
VectorModelItemType,
AudioSpeechModels,
WhisperModelType,
STTModelType,
ReRankModelItemType
} from '../../../core/ai/model.d';
import { SubTypeEnum } from '../../../support/wallet/sub/constants';
@@ -18,6 +18,14 @@ export type NavbarItemType = {
isActive: boolean;
};
export type ExternalProviderWorkflowVarType = {
name: string;
key: string;
intro: string;
isOpen: boolean;
url?: string;
};
/* fastgpt main */
export type FastGPTConfigFileType = {
feConfigs: FastGPTFeConfigsType;
@@ -27,7 +35,7 @@ export type FastGPTConfigFileType = {
vectorModels: VectorModelItemType[];
reRankModels: ReRankModelItemType[];
audioSpeechModels: AudioSpeechModelType[];
whisperModel: WhisperModelType;
whisperModel: STTModelType;
};
export type FastGPTFeConfigsType = {
@@ -58,6 +66,7 @@ export type FastGPTFeConfigsType = {
icon?: string;
title?: string;
url?: string;
autoLogin?: boolean;
};
oauth?: {
github?: string;
@@ -83,6 +92,7 @@ export type FastGPTFeConfigsType = {
uploadFileMaxSize?: number;
lafEnv?: string;
navbarItems?: NavbarItemType[];
externalProviderWorkflowVariables?: ExternalProviderWorkflowVarType[];
};
export type SystemEnvType = {

View File

@@ -1,14 +1,22 @@
export type LLMModelItemType = {
import type { ModelProviderIdType } from './provider';
type PriceType = {
charsPointsPrice?: number; // 1k chars=n points; 60s=n points;
// If inputPrice is set, the input-output charging scheme is adopted
inputPrice?: number; // 1k tokens=n points
outputPrice?: number; // 1k tokens=n points
};
export type LLMModelItemType = PriceType & {
provider: ModelProviderIdType;
model: string;
name: string;
avatar?: string;
avatar?: string; // model icon, from provider
maxContext: number;
maxResponse: number;
quoteMaxToken: number;
maxTemperature: number;
charsPointsPrice: number; // 1k chars=n points
censor?: boolean;
vision?: boolean;
@@ -30,12 +38,12 @@ export type LLMModelItemType = {
fieldMap?: Record<string, string>;
};
export type VectorModelItemType = {
export type VectorModelItemType = PriceType & {
provider: ModelProviderIdType;
model: string; // model name
name: string; // show name
avatar?: string;
defaultToken: number; // split text default token
charsPointsPrice: number; // 1k tokens=n points
maxToken: number; // model max token
weight: number; // training weight
hidden?: boolean; // Disallow creation
@@ -44,23 +52,22 @@ export type VectorModelItemType = {
queryConfig?: Record<string, any>; // Custom parameters for query
};
export type ReRankModelItemType = {
export type ReRankModelItemType = PriceType & {
model: string;
name: string;
charsPointsPrice: number;
requestUrl: string;
requestAuth: string;
};
export type AudioSpeechModelType = {
export type AudioSpeechModelType = PriceType & {
provider: ModelProviderIdType;
model: string;
name: string;
charsPointsPrice: number;
voices: { label: string; value: string; bufferId: string }[];
};
export type WhisperModelType = {
export type STTModelType = PriceType & {
provider: ModelProviderIdType;
model: string;
name: string;
charsPointsPrice: number; // 60s = n points
};

View File

@@ -1,7 +1,10 @@
import type { LLMModelItemType, VectorModelItemType } from './model.d';
import { i18nT } from '../../../web/i18n/utils';
import type { LLMModelItemType, STTModelType, VectorModelItemType } from './model.d';
import { getModelProvider, ModelProviderIdType } from './provider';
export const defaultQAModels: LLMModelItemType[] = [
{
provider: 'OpenAI',
model: 'gpt-4o-mini',
name: 'gpt-4o-mini',
maxContext: 16000,
@@ -23,6 +26,7 @@ export const defaultQAModels: LLMModelItemType[] = [
export const defaultVectorModels: VectorModelItemType[] = [
{
provider: 'OpenAI',
model: 'text-embedding-3-small',
name: 'Embedding-2',
charsPointsPrice: 0,
@@ -31,3 +35,35 @@ export const defaultVectorModels: VectorModelItemType[] = [
weight: 100
}
];
export const defaultWhisperModel: STTModelType = {
provider: 'OpenAI',
model: 'whisper-1',
name: 'whisper-1',
charsPointsPrice: 0
};
export const getModelFromList = (
modelList: { provider: ModelProviderIdType; name: string; model: string }[],
model: string
) => {
const modelData = modelList.find((item) => item.model === model) ?? modelList[0];
const provider = getModelProvider(modelData.provider);
return {
...modelData,
avatar: provider.avatar
};
};
export enum ModelTypeEnum {
chat = 'chat',
embedding = 'embedding',
tts = 'tts',
stt = 'stt'
}
export const modelTypeList = [
{ label: i18nT('common:model.type.chat'), value: ModelTypeEnum.chat },
{ label: i18nT('common:model.type.embedding'), value: ModelTypeEnum.embedding },
{ label: i18nT('common:model.type.tts'), value: ModelTypeEnum.tts },
{ label: i18nT('common:model.type.stt'), value: ModelTypeEnum.stt }
];

View File

@@ -0,0 +1,158 @@
import { i18nT } from '../../../web/i18n/utils';
export type ModelProviderIdType =
| 'OpenAI'
| 'Claude'
| 'Gemini'
| 'Meta'
| 'MistralAI'
| 'Groq'
| 'AliCloud'
| 'Qwen'
| 'Doubao'
| 'ChatGLM'
| 'DeepSeek'
| 'Ernie'
| 'Moonshot'
| 'MiniMax'
| 'SparkDesk'
| 'Hunyuan'
| 'Baichuan'
| 'StepFun'
| 'Yi'
| 'Ollama'
| 'BAAI'
| 'FishAudio'
| 'Other';
export type ModelProviderType = {
id: ModelProviderIdType;
name: string;
avatar: string;
};
export const ModelProviderList: ModelProviderType[] = [
{
id: 'OpenAI',
name: 'OpenAI',
avatar: 'model/openai'
},
{
id: 'Claude',
name: 'Claude',
avatar: 'model/claude'
},
{
id: 'Gemini',
name: 'Gemini',
avatar: 'model/gemini'
},
{
id: 'Meta',
name: 'Meta',
avatar: 'model/meta'
},
{
id: 'MistralAI',
name: 'MistralAI',
avatar: 'model/mistral'
},
{
id: 'Groq',
name: 'Groq',
avatar: 'model/groq'
},
{
id: 'AliCloud',
name: i18nT('common:model_alicloud'),
avatar: 'model/alicloud'
},
{
id: 'Qwen',
name: i18nT('common:model_qwen'),
avatar: 'model/qwen'
},
{
id: 'Doubao',
name: i18nT('common:model_doubao'),
avatar: 'model/doubao'
},
{
id: 'ChatGLM',
name: i18nT('common:model_chatglm'),
avatar: 'model/chatglm'
},
{
id: 'Ernie',
name: i18nT('common:model_ernie'),
avatar: 'model/ernie'
},
{
id: 'DeepSeek',
name: 'DeepSeek',
avatar: 'model/deepseek'
},
{
id: 'Moonshot',
name: i18nT('common:model_moonshot'),
avatar: 'model/moonshot'
},
{
id: 'MiniMax',
name: 'MiniMax',
avatar: 'model/minimax'
},
{
id: 'SparkDesk',
name: i18nT('common:model_sparkdesk'),
avatar: 'model/sparkDesk'
},
{
id: 'Hunyuan',
name: i18nT('common:model_hunyuan'),
avatar: 'model/hunyuan'
},
{
id: 'Baichuan',
name: i18nT('common:model_baichuan'),
avatar: 'model/baichuan'
},
{
id: 'StepFun',
name: i18nT('common:model_stepfun'),
avatar: 'model/stepfun'
},
{
id: 'Yi',
name: i18nT('common:model_yi'),
avatar: 'model/yi'
},
{
id: 'Ollama',
name: 'Ollama',
avatar: 'model/ollama'
},
{
id: 'BAAI',
name: i18nT('common:model_baai'),
avatar: 'model/BAAI'
},
{
id: 'FishAudio',
name: 'FishAudio',
avatar: 'model/fishaudio'
},
{
id: 'Other',
name: i18nT('common:model_other'),
avatar: 'model/huggingface'
}
];
export const ModelProviderMap = Object.fromEntries(
ModelProviderList.map((item, index) => [item.id, { ...item, order: index }])
);
export const getModelProvider = (provider: ModelProviderIdType) => {
return ModelProviderMap[provider] ?? ModelProviderMap.Other;
};

Some files were not shown because too many files have changed in this diff Show More