diff --git a/document/content/docs/introduction/development/meta.json b/document/content/docs/introduction/development/meta.json index 3a131e5be..74f8a47c0 100644 --- a/document/content/docs/introduction/development/meta.json +++ b/document/content/docs/introduction/development/meta.json @@ -9,6 +9,7 @@ "configuration", "docker", "faq", + "signoz", "modelConfig", "openapi", "custom-models", diff --git a/document/content/docs/introduction/development/signoz.mdx b/document/content/docs/introduction/development/signoz.mdx new file mode 100644 index 000000000..f2efe75cb --- /dev/null +++ b/document/content/docs/introduction/development/signoz.mdx @@ -0,0 +1,76 @@ +--- +title: 接入 Signoz 服务监控 +description: FastGPT 接入 Signoz 服务监控 +--- + +## 介绍 + +[SigNoz](https://signoz.io/) 是一款开源的应用性能监控(APM)和可观测性平台,为 FastGPT 提供全面的服务监控能力。它基于 OpenTelemetry 标准,能够收集、处理和可视化分布式系统的遥测数据,包括链路追踪(Tracing)、指标监控(Metrics)和日志分析(Logging)。 + +**主要功能:** + +- **链路追踪**:跟踪用户请求在 FastGPT 各个服务间的完整调用链路 +- **性能监控**:监控 API 响应时间、吞吐量等关键性能指标 +- **错误追踪**:自动捕获和记录系统异常,便于问题排查 +- **日志聚合**:集中收集和管理应用日志,支持结构化查询 +- **实时告警**:基于指标阈值设置告警规则,及时发现系统异常 + +## 部署 Signoz + +可以使用 [SigNoz](https://signoz.io/) 官方云服务,或者私有部署,下面介绍在 Sealos 上快速部署 Signoz。 + +1. 点击下方的卡片,即可一键部署 Signoz。 + +[![](/imgs/Deploy-on-Sealos.svg)](https://hzh.sealos.run/?uid=fnWRt09fZP&openapp=system-template%3FtemplateName%3Dsignoz) + +2. 开启 Signoz 外网访问 + +部署后,可点击 P1 中的详情,进入应用详情页, 然后点击右上角的变更,并开启 4318 端口的外网地址(如果走内网服务,可忽略该步骤)。 + +| P1 | P2 | P3 | +| --- | --- | --- | +| ![alt text](/imgs/image-112.png) | ![alt text](/imgs/image-110.png) | ![alt text](/imgs/image-111.png) | + +3. 获取 Signoz 访问地址 + +变更完成后,等待公网地址就绪,复制该地址,将其填入 FastGPT 中。如果是走内网服务,可以直接复制 4318 端口的内网地址。 + +![alt text](/imgs/image-113.png) + +## 配置 FastGPT + +1. 修改 FastGPT 环境变量 + +``` +SIGNOZ_BASE_URL=上一步复制的地址 +SIGNOZ_SERVICE_NAME=fastgpt # 服务标识名,必须为英文 +SIGNOZ_STORE_LEVEL=warn # 日志等级,可选值: debug, info, warn, error +``` + +2. 重启 FastGPT + +## 查看效果 + +返回 Sealos 应用管理列表,点击进入 Signoz 前端项目,并访问其公网地址,进入管理台。 + +| | | +| --- | --- | +| ![alt text](/imgs/image-114.png) | ![alt text](/imgs/image-115.png) | + +首次注册需要注册一个账号(数据是存储本地数据库),随便填写即可。 + +![alt text](/imgs/image-116.png) + +登录进去后,如果看到右侧 COMPLETED 的步骤条中,logs 和 traces 亮起,则说明配置成功。 + +![alt text](/imgs/image-117.png) + +![alt text](/imgs/image-118.png) + +## 注意事项 + +1. 调整日志存储时长 + +Signoz 监控是一个非常占用磁盘的服务,首先不要把 FastGPT debug 日志也存储进来,另外可以将日志存储时长调整为 7 天。如果突然发现 Signoz 数据不增加了,并且内存一直追加,则说明是磁盘满了,需要扩大容量。 + +![alt text](/imgs/image-119.png) \ No newline at end of file diff --git a/document/content/docs/introduction/guide/dashboard/workflow/loop.mdx b/document/content/docs/introduction/guide/dashboard/workflow/loop.mdx index 0378e2ff4..36d7a53a4 100644 --- a/document/content/docs/introduction/guide/dashboard/workflow/loop.mdx +++ b/document/content/docs/introduction/guide/dashboard/workflow/loop.mdx @@ -74,7 +74,7 @@ description: FastGPT 批量运行节点介绍和使用 ### 循环体配置 -![循环体配置](/imgs/fastgpt-loop-node-config.png) +![循环体配置](/imgs/fastgpt-loop-node-config.webp) 1. 在循环体内部,可以添加任意类型的节点,如: - AI 对话节点 diff --git a/document/content/docs/introduction/guide/knowledge_base/yuque_dataset.mdx b/document/content/docs/introduction/guide/knowledge_base/yuque_dataset.mdx index a89b4824f..aa2f992b8 100644 --- a/document/content/docs/introduction/guide/knowledge_base/yuque_dataset.mdx +++ b/document/content/docs/introduction/guide/knowledge_base/yuque_dataset.mdx @@ -17,10 +17,18 @@ FastGPT v4.8.16 版本开始,商业版用户支持语雀文件库导入,用 参考下图获取 Token 和 User ID,注意给 Token 赋值权限: +**个人版**: + | 获取 Token | 增加权限 | 获取 User ID | | --- | --- | --- | | ![alt text](/imgs/image-33.png) | ![alt text](/imgs/image-34.png) | ![alt text](/imgs/image-35.png) | +**企业版**: + +| 获取 Token | 获取 User ID | +| --- | --- | +| ![alt text](/imgs/image-109.png) | ![alt text](/imgs/image-108.png) | + ## 2. 创建知识库 使用上一步获取的 token 和 uid,创建知识库,选择语雀文件库类型,然后填入对应的参数,点击创建。 diff --git a/document/content/docs/toc.mdx b/document/content/docs/toc.mdx index f98b3e944..48f073af6 100644 --- a/document/content/docs/toc.mdx +++ b/document/content/docs/toc.mdx @@ -42,6 +42,7 @@ description: FastGPT 文档目录 - [/docs/introduction/development/proxy/http_proxy](/docs/introduction/development/proxy/http_proxy) - [/docs/introduction/development/proxy/nginx](/docs/introduction/development/proxy/nginx) - [/docs/introduction/development/sealos](/docs/introduction/development/sealos) +- [/docs/introduction/development/signoz](/docs/introduction/development/signoz) - [/docs/introduction/guide/DialogBoxes/htmlRendering](/docs/introduction/guide/DialogBoxes/htmlRendering) - [/docs/introduction/guide/DialogBoxes/quoteList](/docs/introduction/guide/DialogBoxes/quoteList) - [/docs/introduction/guide/admin/sso](/docs/introduction/guide/admin/sso) diff --git a/document/content/docs/upgrading/4-12/4124.mdx b/document/content/docs/upgrading/4-12/4124.mdx index 3cc7d2df2..eb1094c87 100644 --- a/document/content/docs/upgrading/4-12/4124.mdx +++ b/document/content/docs/upgrading/4-12/4124.mdx @@ -47,7 +47,6 @@ curl --location --request POST 'https://{{host}}/api/admin/initv4124' \ 1. HTTP 工具空指针,导致无法编辑。 2. python 代码运行,入参无法是 boolean 值。 -3. debug 模式下,全局变量未传递。 ## 🔨 插件更新 diff --git a/document/content/docs/upgrading/4-12/4125.mdx b/document/content/docs/upgrading/4-12/4125.mdx index e794d4641..2d18c6ca9 100644 --- a/document/content/docs/upgrading/4-12/4125.mdx +++ b/document/content/docs/upgrading/4-12/4125.mdx @@ -12,7 +12,12 @@ description: 'FastGPT V4.12.5 更新说明' ## 🐛 修复 +1. debug 模式下,全局变量未传递。 +2. debug 模式下,前方节点参数无法传递至后方节点 +3. 调试模式下,开启“自动执行”,会跳过外部变量的填写。 +4. 自动语音回复未生效 +5. 节点复制,报错捕获配置丢失 ## 🔨 插件更新 -1. 新增火山引擎融合信息搜索工具。 \ No newline at end of file +1. 新增火山引擎融合信息搜索工具。 diff --git a/document/data/doc-last-modified.json b/document/data/doc-last-modified.json index 9e699a496..6d64d370e 100644 --- a/document/data/doc-last-modified.json +++ b/document/data/doc-last-modified.json @@ -16,6 +16,7 @@ "document/content/docs/introduction/development/custom-models/chatglm2.mdx": "2025-07-23T21:35:03+08:00", "document/content/docs/introduction/development/custom-models/m3e.mdx": "2025-07-23T21:35:03+08:00", "document/content/docs/introduction/development/custom-models/marker.mdx": "2025-08-04T22:07:52+08:00", + "document/content/docs/introduction/development/custom-models/mineru.mdx": "2025-09-17T18:33:31+08:00", "document/content/docs/introduction/development/custom-models/ollama.mdx": "2025-08-05T23:20:39+08:00", "document/content/docs/introduction/development/custom-models/xinference.mdx": "2025-08-05T23:20:39+08:00", "document/content/docs/introduction/development/design/dataset.mdx": "2025-07-23T21:35:03+08:00", @@ -75,11 +76,11 @@ "document/content/docs/introduction/guide/knowledge_base/api_dataset.mdx": "2025-07-23T21:35:03+08:00", "document/content/docs/introduction/guide/knowledge_base/collection_tags.mdx": "2025-08-02T19:38:37+08:00", "document/content/docs/introduction/guide/knowledge_base/dataset_engine.mdx": "2025-07-23T21:35:03+08:00", - "document/content/docs/introduction/guide/knowledge_base/lark_dataset.mdx": "2025-07-23T21:35:03+08:00", + "document/content/docs/introduction/guide/knowledge_base/lark_dataset.mdx": "2025-09-17T17:40:47+08:00", "document/content/docs/introduction/guide/knowledge_base/template.mdx": "2025-07-23T21:35:03+08:00", "document/content/docs/introduction/guide/knowledge_base/third_dataset.mdx": "2025-07-24T13:00:27+08:00", "document/content/docs/introduction/guide/knowledge_base/websync.mdx": "2025-08-05T23:20:39+08:00", - "document/content/docs/introduction/guide/knowledge_base/yuque_dataset.mdx": "2025-07-23T21:35:03+08:00", + "document/content/docs/introduction/guide/knowledge_base/yuque_dataset.mdx": "2025-09-17T19:04:12+08:00", "document/content/docs/introduction/guide/plugins/bing_search_plugin.mdx": "2025-07-23T21:35:03+08:00", "document/content/docs/introduction/guide/plugins/dev_system_tool.mdx": "2025-08-20T19:00:48+08:00", "document/content/docs/introduction/guide/plugins/doc2x_plugin_guide.mdx": "2025-07-23T21:35:03+08:00", @@ -97,7 +98,7 @@ "document/content/docs/protocol/terms.en.mdx": "2025-08-03T22:37:45+08:00", "document/content/docs/protocol/terms.mdx": "2025-08-03T22:37:45+08:00", "document/content/docs/toc.en.mdx": "2025-08-04T13:42:36+08:00", - "document/content/docs/toc.mdx": "2025-09-17T17:03:12+08:00", + "document/content/docs/toc.mdx": "2025-09-17T18:33:31+08:00", "document/content/docs/upgrading/4-10/4100.mdx": "2025-08-02T19:38:37+08:00", "document/content/docs/upgrading/4-10/4101.mdx": "2025-09-08T20:07:20+08:00", "document/content/docs/upgrading/4-11/4110.mdx": "2025-08-05T23:20:39+08:00", @@ -106,8 +107,8 @@ "document/content/docs/upgrading/4-12/4121.mdx": "2025-09-07T14:41:48+08:00", "document/content/docs/upgrading/4-12/4122.mdx": "2025-09-07T14:41:48+08:00", "document/content/docs/upgrading/4-12/4123.mdx": "2025-09-07T20:55:14+08:00", - "document/content/docs/upgrading/4-12/4124.mdx": "2025-09-16T10:46:55+08:00", - "document/content/docs/upgrading/4-12/4125.mdx": "2025-09-17T17:03:12+08:00", + "document/content/docs/upgrading/4-12/4124.mdx": "2025-09-17T18:36:54+08:00", + "document/content/docs/upgrading/4-12/4125.mdx": "2025-09-17T21:22:47+08:00", "document/content/docs/upgrading/4-8/40.mdx": "2025-08-02T19:38:37+08:00", "document/content/docs/upgrading/4-8/41.mdx": "2025-08-02T19:38:37+08:00", "document/content/docs/upgrading/4-8/42.mdx": "2025-08-02T19:38:37+08:00", diff --git a/document/public/imgs/Deploy-on-Sealos.svg b/document/public/imgs/Deploy-on-Sealos.svg new file mode 100644 index 000000000..8ef6ed396 --- /dev/null +++ b/document/public/imgs/Deploy-on-Sealos.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/document/public/imgs/datasetEngine9.jpg b/document/public/imgs/datasetEngine9.jpg index 2db375702..848f259a7 100644 Binary files a/document/public/imgs/datasetEngine9.jpg and b/document/public/imgs/datasetEngine9.jpg differ diff --git a/document/public/imgs/datasetprompt5.jpg b/document/public/imgs/datasetprompt5.jpg index 1e3bd4e54..bed510e1d 100644 Binary files a/document/public/imgs/datasetprompt5.jpg and b/document/public/imgs/datasetprompt5.jpg differ diff --git a/document/public/imgs/datasetprompt8.jpg b/document/public/imgs/datasetprompt8.jpg index 180e9b5da..3156cc3e1 100644 Binary files a/document/public/imgs/datasetprompt8.jpg and b/document/public/imgs/datasetprompt8.jpg differ diff --git a/document/public/imgs/datasetprompt9.jpg b/document/public/imgs/datasetprompt9.jpg index 8ff8e3426..8b472b7e5 100644 Binary files a/document/public/imgs/datasetprompt9.jpg and b/document/public/imgs/datasetprompt9.jpg differ diff --git a/document/public/imgs/evaluation2.png b/document/public/imgs/evaluation2.png index b98b4be3d..941885136 100644 Binary files a/document/public/imgs/evaluation2.png and b/document/public/imgs/evaluation2.png differ diff --git a/document/public/imgs/evaluation3.png b/document/public/imgs/evaluation3.png index 2e7311fe0..ae1fb90d5 100644 Binary files a/document/public/imgs/evaluation3.png and b/document/public/imgs/evaluation3.png differ diff --git a/document/public/imgs/fastgpt-loop-node-config.png b/document/public/imgs/fastgpt-loop-node-config.png deleted file mode 100644 index f788f416f..000000000 Binary files a/document/public/imgs/fastgpt-loop-node-config.png and /dev/null differ diff --git a/document/public/imgs/fastgpt-loop-node-config.webp b/document/public/imgs/fastgpt-loop-node-config.webp new file mode 100644 index 000000000..091ec526f Binary files /dev/null and b/document/public/imgs/fastgpt-loop-node-config.webp differ diff --git a/document/public/imgs/fastgpt-loop-node-example-5.png b/document/public/imgs/fastgpt-loop-node-example-5.png index 73ff01902..32f25c5e4 100644 Binary files a/document/public/imgs/fastgpt-loop-node-example-5.png and b/document/public/imgs/fastgpt-loop-node-example-5.png differ diff --git a/document/public/imgs/fileinpu-3.jpg b/document/public/imgs/fileinpu-3.jpg index d4c8e7628..7f7576f56 100644 Binary files a/document/public/imgs/fileinpu-3.jpg and b/document/public/imgs/fileinpu-3.jpg differ diff --git a/document/public/imgs/fileinpu-5.jpg b/document/public/imgs/fileinpu-5.jpg index caf8e8530..7eab98b6e 100644 Binary files a/document/public/imgs/fileinpu-5.jpg and b/document/public/imgs/fileinpu-5.jpg differ diff --git a/document/public/imgs/gapierTool3.png b/document/public/imgs/gapierTool3.png index 54b16374f..685557004 100644 Binary files a/document/public/imgs/gapierTool3.png and b/document/public/imgs/gapierTool3.png differ diff --git a/document/public/imgs/image-100.png b/document/public/imgs/image-100.png index 2fcd4c06a..b2cd048b1 100644 Binary files a/document/public/imgs/image-100.png and b/document/public/imgs/image-100.png differ diff --git a/document/public/imgs/image-108.png b/document/public/imgs/image-108.png new file mode 100644 index 000000000..d299f8b07 Binary files /dev/null and b/document/public/imgs/image-108.png differ diff --git a/document/public/imgs/image-109.png b/document/public/imgs/image-109.png new file mode 100644 index 000000000..50b26a498 Binary files /dev/null and b/document/public/imgs/image-109.png differ diff --git a/document/public/imgs/image-110.png b/document/public/imgs/image-110.png new file mode 100644 index 000000000..cb75fe994 Binary files /dev/null and b/document/public/imgs/image-110.png differ diff --git a/document/public/imgs/image-111.png b/document/public/imgs/image-111.png new file mode 100644 index 000000000..6e12a8286 Binary files /dev/null and b/document/public/imgs/image-111.png differ diff --git a/document/public/imgs/image-112.png b/document/public/imgs/image-112.png new file mode 100644 index 000000000..5402192fc Binary files /dev/null and b/document/public/imgs/image-112.png differ diff --git a/document/public/imgs/image-113.png b/document/public/imgs/image-113.png new file mode 100644 index 000000000..14cc6d417 Binary files /dev/null and b/document/public/imgs/image-113.png differ diff --git a/document/public/imgs/image-114.png b/document/public/imgs/image-114.png new file mode 100644 index 000000000..0cd6638f2 Binary files /dev/null and b/document/public/imgs/image-114.png differ diff --git a/document/public/imgs/image-115.png b/document/public/imgs/image-115.png new file mode 100644 index 000000000..f0503b042 Binary files /dev/null and b/document/public/imgs/image-115.png differ diff --git a/document/public/imgs/image-116.png b/document/public/imgs/image-116.png new file mode 100644 index 000000000..6b5e42086 Binary files /dev/null and b/document/public/imgs/image-116.png differ diff --git a/document/public/imgs/image-117.png b/document/public/imgs/image-117.png new file mode 100644 index 000000000..643fb5570 Binary files /dev/null and b/document/public/imgs/image-117.png differ diff --git a/document/public/imgs/image-118.png b/document/public/imgs/image-118.png new file mode 100644 index 000000000..5b53c84cb Binary files /dev/null and b/document/public/imgs/image-118.png differ diff --git a/document/public/imgs/image-119.png b/document/public/imgs/image-119.png new file mode 100644 index 000000000..65ff129b0 Binary files /dev/null and b/document/public/imgs/image-119.png differ diff --git a/document/public/imgs/image-5.png b/document/public/imgs/image-5.png index 912b3f538..02e4d7fd8 100644 Binary files a/document/public/imgs/image-5.png and b/document/public/imgs/image-5.png differ diff --git a/document/public/imgs/image-60.png b/document/public/imgs/image-60.png index 31a0c4761..f85e13a72 100644 Binary files a/document/public/imgs/image-60.png and b/document/public/imgs/image-60.png differ diff --git a/document/public/imgs/image-64.png b/document/public/imgs/image-64.png index fccce7595..a727c55e5 100644 Binary files a/document/public/imgs/image-64.png and b/document/public/imgs/image-64.png differ diff --git a/document/public/imgs/image-67.png b/document/public/imgs/image-67.png index cc0b9c611..003ebdfca 100644 Binary files a/document/public/imgs/image-67.png and b/document/public/imgs/image-67.png differ diff --git a/document/public/imgs/image-7.png b/document/public/imgs/image-7.png index 16e01d9a2..5cb7edfa3 100644 Binary files a/document/public/imgs/image-7.png and b/document/public/imgs/image-7.png differ diff --git a/document/public/imgs/image-71.png b/document/public/imgs/image-71.png index 8560c40b2..f4952e587 100644 Binary files a/document/public/imgs/image-71.png and b/document/public/imgs/image-71.png differ diff --git a/document/public/imgs/image-91.png b/document/public/imgs/image-91.png index 25fc67b92..aaea298fa 100644 Binary files a/document/public/imgs/image-91.png and b/document/public/imgs/image-91.png differ diff --git a/document/public/imgs/image-97.png b/document/public/imgs/image-97.png index f376836b3..58ef2cfa9 100644 Binary files a/document/public/imgs/image-97.png and b/document/public/imgs/image-97.png differ diff --git a/document/public/imgs/mcp_tools3.png b/document/public/imgs/mcp_tools3.png index f08457a72..bf4d6a681 100644 Binary files a/document/public/imgs/mcp_tools3.png and b/document/public/imgs/mcp_tools3.png differ diff --git a/document/public/imgs/mcp_tools4.png b/document/public/imgs/mcp_tools4.png index 228871e71..ffc59b42b 100644 Binary files a/document/public/imgs/mcp_tools4.png and b/document/public/imgs/mcp_tools4.png differ diff --git a/document/public/imgs/mcp_tools5.png b/document/public/imgs/mcp_tools5.png index 41daf0685..1542c0647 100644 Binary files a/document/public/imgs/mcp_tools5.png and b/document/public/imgs/mcp_tools5.png differ diff --git a/document/public/imgs/mcp_tools6.png b/document/public/imgs/mcp_tools6.png index 148d8e548..3c2afaff7 100644 Binary files a/document/public/imgs/mcp_tools6.png and b/document/public/imgs/mcp_tools6.png differ diff --git a/document/public/imgs/mcp_tools7.png b/document/public/imgs/mcp_tools7.png index e5f137602..ccf697044 100644 Binary files a/document/public/imgs/mcp_tools7.png and b/document/public/imgs/mcp_tools7.png differ diff --git a/document/public/imgs/mcp_tools8.png b/document/public/imgs/mcp_tools8.png index 3a580c7eb..8cc4edac9 100644 Binary files a/document/public/imgs/mcp_tools8.png and b/document/public/imgs/mcp_tools8.png differ diff --git a/document/public/imgs/mineru1.png b/document/public/imgs/mineru1.png index 16087de64..b2f9b3582 100644 Binary files a/document/public/imgs/mineru1.png and b/document/public/imgs/mineru1.png differ diff --git a/document/public/imgs/mineru3-1.png b/document/public/imgs/mineru3-1.png index 3f6ce2806..fe8c98cd4 100644 Binary files a/document/public/imgs/mineru3-1.png and b/document/public/imgs/mineru3-1.png differ diff --git a/document/public/imgs/mineru3.png b/document/public/imgs/mineru3.png index 5e635fcf8..f9720f676 100644 Binary files a/document/public/imgs/mineru3.png and b/document/public/imgs/mineru3.png differ diff --git a/document/public/imgs/mineru4-1.png b/document/public/imgs/mineru4-1.png index 19b8d3f2f..348a80c92 100644 Binary files a/document/public/imgs/mineru4-1.png and b/document/public/imgs/mineru4-1.png differ diff --git a/document/public/imgs/mineru5-1.png b/document/public/imgs/mineru5-1.png index b0ff98cc2..cc8c22343 100644 Binary files a/document/public/imgs/mineru5-1.png and b/document/public/imgs/mineru5-1.png differ diff --git a/document/public/imgs/mineru5.png b/document/public/imgs/mineru5.png index b1cab03ec..5e9ee5607 100644 Binary files a/document/public/imgs/mineru5.png and b/document/public/imgs/mineru5.png differ diff --git a/document/public/imgs/mineru6.png b/document/public/imgs/mineru6.png index afe656385..985ec722a 100644 Binary files a/document/public/imgs/mineru6.png and b/document/public/imgs/mineru6.png differ diff --git a/document/public/imgs/model-m3e3.png b/document/public/imgs/model-m3e3.png index 5120aaf7f..200919502 100644 Binary files a/document/public/imgs/model-m3e3.png and b/document/public/imgs/model-m3e3.png differ diff --git a/document/public/imgs/plugin-openapi2.png b/document/public/imgs/plugin-openapi2.png index 8048b75d7..74202f370 100644 Binary files a/document/public/imgs/plugin-openapi2.png and b/document/public/imgs/plugin-openapi2.png differ diff --git a/document/public/imgs/plugin_submission2.png b/document/public/imgs/plugin_submission2.png index 5008d87ed..d3607f5c2 100644 Binary files a/document/public/imgs/plugin_submission2.png and b/document/public/imgs/plugin_submission2.png differ diff --git a/document/public/imgs/plugin_submission7.png b/document/public/imgs/plugin_submission7.png index a13d382f9..8bd8abfcc 100644 Binary files a/document/public/imgs/plugin_submission7.png and b/document/public/imgs/plugin_submission7.png differ diff --git a/document/public/imgs/sealos-redis1.png b/document/public/imgs/sealos-redis1.png index 240f30786..fea51f109 100644 Binary files a/document/public/imgs/sealos-redis1.png and b/document/public/imgs/sealos-redis1.png differ diff --git a/document/public/imgs/searxng_plugin_guide1.png b/document/public/imgs/searxng_plugin_guide1.png index 9204d66de..0169dc236 100644 Binary files a/document/public/imgs/searxng_plugin_guide1.png and b/document/public/imgs/searxng_plugin_guide1.png differ diff --git a/document/public/imgs/sso2.png b/document/public/imgs/sso2.png index 0cfa4f5d0..42d32b8e9 100644 Binary files a/document/public/imgs/sso2.png and b/document/public/imgs/sso2.png differ diff --git a/document/public/imgs/teammode.png b/document/public/imgs/teammode.png index e7cb573df..8cf9bc278 100644 Binary files a/document/public/imgs/teammode.png and b/document/public/imgs/teammode.png differ diff --git a/document/public/imgs/thirddataset-10.png b/document/public/imgs/thirddataset-10.png index cf236427d..ac04cfc3f 100644 Binary files a/document/public/imgs/thirddataset-10.png and b/document/public/imgs/thirddataset-10.png differ diff --git a/document/public/imgs/thirddataset-19.png b/document/public/imgs/thirddataset-19.png index 0c420a382..2fc2c0812 100644 Binary files a/document/public/imgs/thirddataset-19.png and b/document/public/imgs/thirddataset-19.png differ diff --git a/document/public/imgs/thirddataset-2.png b/document/public/imgs/thirddataset-2.png index bfc6e3eed..33468c01d 100644 Binary files a/document/public/imgs/thirddataset-2.png and b/document/public/imgs/thirddataset-2.png differ diff --git a/document/public/imgs/thirddataset-20.png b/document/public/imgs/thirddataset-20.png index 89d6f4e00..8645fb659 100644 Binary files a/document/public/imgs/thirddataset-20.png and b/document/public/imgs/thirddataset-20.png differ diff --git a/document/public/imgs/thirddataset-21.png b/document/public/imgs/thirddataset-21.png index 2d8f02086..5e7028c06 100644 Binary files a/document/public/imgs/thirddataset-21.png and b/document/public/imgs/thirddataset-21.png differ diff --git a/document/public/imgs/translate17.png b/document/public/imgs/translate17.png index f069ece15..04196862b 100644 Binary files a/document/public/imgs/translate17.png and b/document/public/imgs/translate17.png differ diff --git a/document/public/imgs/translate2.png b/document/public/imgs/translate2.png index 94530362a..8f6284ad8 100644 Binary files a/document/public/imgs/translate2.png and b/document/public/imgs/translate2.png differ diff --git a/document/public/imgs/variable_update5.png b/document/public/imgs/variable_update5.png index e61042745..d8056f3c2 100644 Binary files a/document/public/imgs/variable_update5.png and b/document/public/imgs/variable_update5.png differ diff --git a/document/public/imgs/webSync4.jpg b/document/public/imgs/webSync4.jpg index dbba8909e..9bbe8750d 100644 Binary files a/document/public/imgs/webSync4.jpg and b/document/public/imgs/webSync4.jpg differ diff --git a/document/public/imgs/wecom-bot-10.png b/document/public/imgs/wecom-bot-10.png index 6f2ee2be8..8da377f3d 100644 Binary files a/document/public/imgs/wecom-bot-10.png and b/document/public/imgs/wecom-bot-10.png differ diff --git a/document/public/imgs/wecom-bot-19.png b/document/public/imgs/wecom-bot-19.png index e6b9c4cbe..814d85632 100644 Binary files a/document/public/imgs/wecom-bot-19.png and b/document/public/imgs/wecom-bot-19.png differ diff --git a/document/public/imgs/wecom-bot-2.png b/document/public/imgs/wecom-bot-2.png index b987d4cc0..d1353c93a 100644 Binary files a/document/public/imgs/wecom-bot-2.png and b/document/public/imgs/wecom-bot-2.png differ diff --git a/document/public/imgs/wecom-bot-4.png b/document/public/imgs/wecom-bot-4.png index fb32ff4ea..18ab2a995 100644 Binary files a/document/public/imgs/wecom-bot-4.png and b/document/public/imgs/wecom-bot-4.png differ diff --git a/document/public/imgs/wecom-bot-5.png b/document/public/imgs/wecom-bot-5.png index 0a61396fe..d14d1bfc4 100644 Binary files a/document/public/imgs/wecom-bot-5.png and b/document/public/imgs/wecom-bot-5.png differ diff --git a/document/public/imgs/wecom-bot-9.png b/document/public/imgs/wecom-bot-9.png index 65f0764b5..439f79df8 100644 Binary files a/document/public/imgs/wecom-bot-9.png and b/document/public/imgs/wecom-bot-9.png differ diff --git a/packages/service/core/workflow/dispatch/index.ts b/packages/service/core/workflow/dispatch/index.ts index e2c92ef69..73097fc6d 100644 --- a/packages/service/core/workflow/dispatch/index.ts +++ b/packages/service/core/workflow/dispatch/index.ts @@ -141,6 +141,7 @@ export const runWorkflow = async (data: RunWorkflowProps): Promise ({ diff --git a/packages/service/core/workflow/dispatch/type.d.ts b/packages/service/core/workflow/dispatch/type.d.ts index f642e1854..2bf3280e8 100644 --- a/packages/service/core/workflow/dispatch/type.d.ts +++ b/packages/service/core/workflow/dispatch/type.d.ts @@ -15,6 +15,7 @@ import type { ChatNodeUsageType } from '@fastgpt/global/support/wallet/bill/type export type WorkflowDebugResponse = { memoryEdges: RuntimeEdgeItemType[]; + memoryNodes: RuntimeNodeItemType[]; entryNodeIds: string[]; // Next step entry nodes nodeResponses: Record< string, diff --git a/packages/web/i18n/en/common.json b/packages/web/i18n/en/common.json index 05ad96199..df4a2bd8d 100644 --- a/packages/web/i18n/en/common.json +++ b/packages/web/i18n/en/common.json @@ -707,7 +707,6 @@ "core.workflow.Custom outputs": "Custom Outputs", "core.workflow.Dataset quote": "Dataset Quote", "core.workflow.Debug": "Debug", - "core.workflow.Debug Node": "Debug Mode", "core.workflow.Failed": "Run Failed", "core.workflow.Not intro": "This Node Has No Introduction", "core.workflow.Run": "Run", diff --git a/packages/web/i18n/en/workflow.json b/packages/web/i18n/en/workflow.json index 7c1864c28..043e47d4d 100644 --- a/packages/web/i18n/en/workflow.json +++ b/packages/web/i18n/en/workflow.json @@ -46,6 +46,7 @@ "dataset_quote_role_system_option_desc": "Historical records should be consistent first (recommended)", "dataset_quote_role_tip": "When set to System, the knowledge base reference content will be placed in the system message, which can ensure the continuity of the history record, but the constraint effect may not be good.\n\nWhen set to User, the knowledge base reference content will be placed in the user message, and the {{question}} variable location needs to be specified. \nIt will have a certain impact on the consistency of historical records, but usually the constraint effect is better.", "dataset_quote_role_user_option_desc": "Strong constraints take precedence", + "debug_test": "Debug debugging", "dynamic_input_description": "Receive the output value of the previous node as a variable, which can be used by Laf request parameters.", "edit_input": "Edit Input", "edit_output": "Edit output", diff --git a/packages/web/i18n/zh-CN/chat.json b/packages/web/i18n/zh-CN/chat.json index b87dc231a..780c686eb 100644 --- a/packages/web/i18n/zh-CN/chat.json +++ b/packages/web/i18n/zh-CN/chat.json @@ -1,5 +1,5 @@ { - "AI_input_is_empty": "传入AI 节点的内容为空", + "AI_input_is_empty": "传入 AI 节点的内容为空", "Delete_all": "清空词库", "LLM_model_response_empty": "模型流响应为空,请检查模型流输出是否正常", "ai_reasoning": "思考过程", diff --git a/packages/web/i18n/zh-CN/common.json b/packages/web/i18n/zh-CN/common.json index f79683ad6..f0f867f23 100644 --- a/packages/web/i18n/zh-CN/common.json +++ b/packages/web/i18n/zh-CN/common.json @@ -707,7 +707,6 @@ "core.workflow.Custom outputs": "自定义输出", "core.workflow.Dataset quote": "知识库引用", "core.workflow.Debug": "调试", - "core.workflow.Debug Node": "Debug 模式", "core.workflow.Failed": "运行失败", "core.workflow.Not intro": "这个节点没有介绍~", "core.workflow.Run": "运行", diff --git a/packages/web/i18n/zh-CN/workflow.json b/packages/web/i18n/zh-CN/workflow.json index 5efce7e4a..1a6296673 100644 --- a/packages/web/i18n/zh-CN/workflow.json +++ b/packages/web/i18n/zh-CN/workflow.json @@ -46,6 +46,7 @@ "dataset_quote_role_system_option_desc": "历史记录连贯优先(推荐)", "dataset_quote_role_tip": "设置为 System 时,将会把知识库引用内容放置到 system 消息中,可以确保历史记录的连贯性,但约束效果可能不佳,需要多调试。\n设置为 User 时,将会把知识库引用内容放置到 user 消息中,并且需要指定 {{question}} 变量位置。会对历史记录连贯性有一定影响,但通常约束效果更优。", "dataset_quote_role_user_option_desc": "强约束优先", + "debug_test": "Debug 调试", "dynamic_input_description": "接收前方节点的输出值作为变量,这些变量可以被 Laf 请求参数使用。", "edit_input": "编辑输入", "edit_output": "编辑输出", diff --git a/packages/web/i18n/zh-Hant/common.json b/packages/web/i18n/zh-Hant/common.json index 98262cfc2..ef9c3fba4 100644 --- a/packages/web/i18n/zh-Hant/common.json +++ b/packages/web/i18n/zh-Hant/common.json @@ -706,7 +706,6 @@ "core.workflow.Custom outputs": "自訂輸出", "core.workflow.Dataset quote": "知識庫引用", "core.workflow.Debug": "除錯", - "core.workflow.Debug Node": "除錯模式", "core.workflow.Failed": "執行失敗", "core.workflow.Not intro": "此節點沒有介紹", "core.workflow.Run": "執行", diff --git a/packages/web/i18n/zh-Hant/workflow.json b/packages/web/i18n/zh-Hant/workflow.json index 5203686fe..e3b1b7dbe 100644 --- a/packages/web/i18n/zh-Hant/workflow.json +++ b/packages/web/i18n/zh-Hant/workflow.json @@ -46,6 +46,7 @@ "dataset_quote_role_system_option_desc": "歷史紀錄連貫優先(建議)", "dataset_quote_role_tip": "設定為 System 時,會將知識庫引用內容放置到系統訊息中,可以確保歷史紀錄的連貫性,但約束效果可能不佳。\n設定為 User 時,會將知識庫引用內容放置到使用者訊息中,並且需要指定 {{question}} 變數位置。會對歷史紀錄連貫性有一定影響,但通常約束效果較佳。", "dataset_quote_role_user_option_desc": "強約束優先", + "debug_test": "Debug 調試", "dynamic_input_description": "接收前一個節點的輸出值作為變數,這些變數可以被 Laf 請求參數使用。", "edit_input": "編輯輸入", "edit_output": "編輯輸出", diff --git a/projects/app/src/components/core/app/formRender/LabelAndForm.tsx b/projects/app/src/components/core/app/formRender/LabelAndForm.tsx index 438491033..bc2776c5e 100644 --- a/projects/app/src/components/core/app/formRender/LabelAndForm.tsx +++ b/projects/app/src/components/core/app/formRender/LabelAndForm.tsx @@ -53,7 +53,7 @@ const LabelAndFormRender = ({ return ( - {typeof label === 'string' ? {label} : label} + {typeof label === 'string' ? {t(label)} : label} {placeholder && } diff --git a/projects/app/src/components/core/chat/ChatContainer/ChatBox/Input/ChatInput.tsx b/projects/app/src/components/core/chat/ChatContainer/ChatBox/Input/ChatInput.tsx index e8ff0343e..0e87d496d 100644 --- a/projects/app/src/components/core/chat/ChatContainer/ChatBox/Input/ChatInput.tsx +++ b/projects/app/src/components/core/chat/ChatContainer/ChatBox/Input/ChatInput.tsx @@ -64,6 +64,7 @@ const ChatInput = ({ const chatInputGuide = useContextSelector(ChatBoxContext, (v) => v.chatInputGuide); const fileSelectConfig = useContextSelector(ChatBoxContext, (v) => v.fileSelectConfig); const dialogTips = useContextSelector(ChatBoxContext, (v) => v.dialogTips); + const autoTTSResponse = useContextSelector(ChatBoxContext, (v) => v.autoTTSResponse); const fileCtrl = useFieldArray({ control, @@ -448,7 +449,8 @@ const ChatInput = ({ handleSend={(text) => { onSendMessage({ text: text.trim(), - files: fileList + files: fileList, + autoTTSResponse }); replaceFiles([]); }} diff --git a/projects/app/src/components/core/chat/ChatContainer/ChatBox/Provider.tsx b/projects/app/src/components/core/chat/ChatContainer/ChatBox/Provider.tsx index e1203b3ea..8427caf0c 100644 --- a/projects/app/src/components/core/chat/ChatContainer/ChatBox/Provider.tsx +++ b/projects/app/src/components/core/chat/ChatContainer/ChatBox/Provider.tsx @@ -46,7 +46,6 @@ export type ChatProviderProps = { type useChatStoreType = ChatProviderProps & { welcomeText: string; variableList: VariableItemType[]; - allVariableList: VariableItemType[]; questionGuide: AppQGConfigType; ttsConfig: AppTTSConfigType; whisperConfig: AppWhisperConfigType; @@ -238,10 +237,7 @@ const Provider = ({ const value: useChatStoreType = { ...props, welcomeText, - variableList: variables.filter( - (item) => item.type !== VariableInputEnum.custom && item.type !== VariableInputEnum.internal - ), - allVariableList: variables, + variableList: variables, questionGuide, ttsConfig, fileSelectConfig, diff --git a/projects/app/src/components/core/chat/ChatContainer/ChatBox/components/VariableInputForm.tsx b/projects/app/src/components/core/chat/ChatContainer/ChatBox/components/VariableInputForm.tsx index 0a7391bbb..e1e9cb0b6 100644 --- a/projects/app/src/components/core/chat/ChatContainer/ChatBox/components/VariableInputForm.tsx +++ b/projects/app/src/components/core/chat/ChatContainer/ChatBox/components/VariableInputForm.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useMemo } from 'react'; +import React, { useMemo } from 'react'; import { type UseFormReturn } from 'react-hook-form'; import { useTranslation } from 'next-i18next'; import { Box, Button, Card, Flex } from '@chakra-ui/react'; @@ -152,6 +152,19 @@ const VariableInput = ({ /> ); })} + {!chatStarted && commonVariableList.length === 0 && ( + + )} )} diff --git a/projects/app/src/components/core/chat/ChatContainer/ChatBox/components/home/ChatHomeVariablesForm.tsx b/projects/app/src/components/core/chat/ChatContainer/ChatBox/components/home/ChatHomeVariablesForm.tsx index d68ae86de..f3ec38791 100644 --- a/projects/app/src/components/core/chat/ChatContainer/ChatBox/components/home/ChatHomeVariablesForm.tsx +++ b/projects/app/src/components/core/chat/ChatContainer/ChatBox/components/home/ChatHomeVariablesForm.tsx @@ -20,7 +20,12 @@ const ChatHomeVariablesForm = ({ chatForm }: Props) => { const variablesForm = useContextSelector(ChatItemContext, (v) => v.variablesForm); const variableList = useContextSelector(ChatBoxContext, (v) => v.variableList); - const allVariableList = useContextSelector(ChatBoxContext, (v) => v.allVariableList); + const externalVariableList = variableList.filter( + (item) => item.type === VariableInputEnum.custom + ); + const commonVariableList = variableList.filter( + (item) => item.type !== VariableInputEnum.custom && item.type !== VariableInputEnum.internal + ); return ( { > {/* custom variables */} - {allVariableList.filter((i) => i.type === VariableInputEnum.custom).length > 0 && ( + {externalVariableList.length > 0 && ( <> - {allVariableList - .filter((i) => i.type === VariableInputEnum.custom) - .map((item) => ( - - ))} + {externalVariableList.map((item) => ( + + ))} )} {/* normal variables */} - {variableList.length > 0 && ( + {commonVariableList.length > 0 && ( <> - {variableList.map((item) => ( + {commonVariableList.map((item) => ( v.outLinkAuthData); const welcomeText = useContextSelector(ChatBoxContext, (v) => v.welcomeText); const variableList = useContextSelector(ChatBoxContext, (v) => v.variableList); - const allVariableList = useContextSelector(ChatBoxContext, (v) => v.allVariableList); const questionGuide = useContextSelector(ChatBoxContext, (v) => v.questionGuide); const startSegmentedAudio = useContextSelector(ChatBoxContext, (v) => v.startSegmentedAudio); const finishSegmentedAudio = useContextSelector(ChatBoxContext, (v) => v.finishSegmentedAudio); @@ -156,11 +155,14 @@ const ChatBox = ({ const isInteractive = useMemo(() => checkIsInteractiveByHistories(chatRecords), [chatRecords]); const showExternalVariable = useMemo(() => { - return ( - [ChatTypeEnum.log, ChatTypeEnum.test, ChatTypeEnum.chat].includes(chatType) && - allVariableList.some((item) => item.type === VariableInputEnum.custom) - ); - }, [allVariableList, chatType]); + const map: Record = { + [ChatTypeEnum.log]: true, + [ChatTypeEnum.test]: true, + [ChatTypeEnum.chat]: true, + [ChatTypeEnum.home]: true + }; + return map[chatType] && variableList.some((item) => item.type === VariableInputEnum.custom); + }, [variableList, chatType]); // compute variable input is finish. const chatForm = useForm({ @@ -173,10 +175,20 @@ const ChatBox = ({ const { setValue, watch } = chatForm; const chatStartedWatch = watch('chatStarted'); - // 可以进入对话框对话 + const commonVariableList = variableList.filter( + (item) => item.type !== VariableInputEnum.custom && item.type !== VariableInputEnum.internal + ); + + /* + 对话已经开始的标记: + 1. 保证 appId 一致。 + 2. 有对话记录/手动点了开始/默认没有需要填写的变量。 + */ const chatStarted = chatBoxData?.appId === appId && - (chatRecords.length > 0 || chatStartedWatch || variableList.length === 0); + (chatRecords.length > 0 || + chatStartedWatch || + (commonVariableList.length === 0 && !showExternalVariable)); // 滚动到底部 const scrollToBottom = useMemoizedFn((behavior: 'smooth' | 'auto' = 'smooth', delay = 0) => { @@ -449,7 +461,7 @@ const ChatBox = ({ // Only declared variables are kept const requestVariables: Record = {}; - allVariableList?.forEach((item) => { + variableList?.forEach((item) => { const val = variables[item.key] === '' || variables[item.key] === undefined || @@ -827,7 +839,7 @@ const ChatBox = ({ feConfigs?.show_emptyChat && showEmptyIntro && chatRecords.length === 0 && - !variableList?.length && + !commonVariableList?.length && !showExternalVariable && !welcomeText, [ @@ -835,7 +847,7 @@ const ChatBox = ({ feConfigs?.show_emptyChat, showEmptyIntro, chatRecords.length, - variableList?.length, + commonVariableList?.length, showExternalVariable, welcomeText ] @@ -1126,8 +1138,7 @@ const ChatBox = ({ > {HomeChatRenderBox} - {allVariableList.filter((item) => item.type !== VariableInputEnum.internal).length > - 0 ? ( + {variableList.filter((item) => item.type !== VariableInputEnum.internal).length > 0 ? ( diff --git a/projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/hooks/useDebug.tsx b/projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/hooks/useDebug.tsx index 71b230ddb..ef78f5ed6 100644 --- a/projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/hooks/useDebug.tsx +++ b/projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/hooks/useDebug.tsx @@ -30,6 +30,7 @@ import { nodeInputTypeToInputType, variableInputTypeToInputType } from '@/components/core/app/formRender/utils'; +import { useSafeTranslation } from '@fastgpt/web/hooks/useSafeTranslation'; const MyRightDrawer = dynamic( () => import('@fastgpt/web/components/common/MyDrawer/MyRightDrawer') @@ -41,7 +42,7 @@ enum TabEnum { } export const useDebug = () => { - const { t } = useTranslation(); + const { t } = useSafeTranslation(); const { toast } = useToast(); const setNodes = useContextSelector(WorkflowNodeEdgeContext, (v) => v.setNodes); @@ -241,8 +242,8 @@ export const useDebug = () => { @@ -260,12 +261,27 @@ export const useDebug = () => { onChange={setCurrentTab} /> )} + + {renderInputs.map((item) => ( + + ))} + {customVar.map((item) => ( { ))} {internalVar.map((item) => ( { ))} {filteredVar.map((item) => ( { /> ))} - - {renderInputs.map((item) => ( - - ))} - diff --git a/projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/render/NodeCard.tsx b/projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/render/NodeCard.tsx index 39cb937c9..108cd5e59 100644 --- a/projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/render/NodeCard.tsx +++ b/projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/render/NodeCard.tsx @@ -514,7 +514,8 @@ const MenuRender = React.memo(function MenuRender({ version: template.version, versionLabel: template.versionLabel, isLatestVersion: template.isLatestVersion, - toolConfig: template.toolConfig + toolConfig: template.toolConfig, + catchError: template.catchError }, selected: true, parentNodeId: undefined, diff --git a/projects/app/src/pageComponents/app/detail/WorkflowComponents/context/index.tsx b/projects/app/src/pageComponents/app/detail/WorkflowComponents/context/index.tsx index c357e097a..f28afecfb 100644 --- a/projects/app/src/pageComponents/app/detail/WorkflowComponents/context/index.tsx +++ b/projects/app/src/pageComponents/app/detail/WorkflowComponents/context/index.tsx @@ -707,25 +707,31 @@ const WorkflowContextProvider = ({ try { // 3. Run one step - const { memoryEdges, entryNodeIds, skipNodeQueue, nodeResponses, newVariables } = - await postWorkflowDebug({ - nodes: runtimeNodes, - edges: debugData.runtimeEdges, - skipNodeQueue: debugData.skipNodeQueue, - variables: { - appId, - cTime: formatTime2YMDHMW(), - ...debugData.variables - }, - query: debugData.query, // 添加 query 参数 - history: debugData.history, + const { + memoryEdges, + memoryNodes, + entryNodeIds, + skipNodeQueue, + nodeResponses, + newVariables + } = await postWorkflowDebug({ + nodes: runtimeNodes, + edges: debugData.runtimeEdges, + skipNodeQueue: debugData.skipNodeQueue, + variables: { appId, - chatConfig: appDetail.chatConfig - }); + cTime: formatTime2YMDHMW(), + ...debugData.variables + }, + query: debugData.query, // 添加 query 参数 + history: debugData.history, + appId, + chatConfig: appDetail.chatConfig + }); // 4. Store debug result setWorkflowDebugData({ - runtimeNodes: debugData.runtimeNodes, + runtimeNodes: memoryNodes, runtimeEdges: memoryEdges, entryNodeIds, skipNodeQueue, @@ -776,7 +782,7 @@ const WorkflowContextProvider = ({ console.log(error); } }, - [appId, onChangeNode, setNodes] + [appId, onChangeNode, setNodes, appDetail.chatConfig] ); const onStopNodeDebug = useMemoizedFn(() => { setWorkflowDebugData(undefined);