Commit 6bd39b27 by Archer Committed by GitHub

fix: workflow tool (#7226)

parent 9c8b935c
...@@ -3,6 +3,13 @@ title: OpenSandbox Deployment ...@@ -3,6 +3,13 @@ title: OpenSandbox Deployment
description: Use self-hosted OpenSandbox with FastGPT Agent Sandbox description: Use self-hosted OpenSandbox with FastGPT Agent Sandbox
--- ---
import { Alert } from '@/components/docs/Alert';
<Alert icon="⚠️" context="warning">
Note: The OpenSandbox setup does not provide network isolation by default. Add your own network
isolation policy if your deployment requires it.
</Alert>
OpenSandbox is suitable when you want to self-host the Agent/Skill sandbox runtime. Before starting, complete [General Sandbox Configuration](./common), make sure `fastgpt-agent-sandbox-proxy` is deployed, and configure the same `AGENT_SANDBOX_PROXY_SECRET` and browser-accessible `AGENT_SANDBOX_PROXY_URL` in both `fastgpt-app` and `fastgpt-pro`. OpenSandbox is suitable when you want to self-host the Agent/Skill sandbox runtime. Before starting, complete [General Sandbox Configuration](./common), make sure `fastgpt-agent-sandbox-proxy` is deployed, and configure the same `AGENT_SANDBOX_PROXY_SECRET` and browser-accessible `AGENT_SANDBOX_PROXY_URL` in both `fastgpt-app` and `fastgpt-pro`.
The OpenSandbox setup flow is below. The OpenSandbox setup flow is below.
......
...@@ -3,6 +3,12 @@ title: OpenSandbox 部署 ...@@ -3,6 +3,12 @@ title: OpenSandbox 部署
description: FastGPT 使用 OpenSandbox 自托管 Agent Sandbox description: FastGPT 使用 OpenSandbox 自托管 Agent Sandbox
--- ---
import { Alert } from '@/components/docs/Alert';
<Alert icon="⚠️" context="warning">
注意:OpenSandbox 方案默认未做网络隔离。如需网络隔离,请自行补充对应的网络隔离策略。
</Alert>
OpenSandbox 适合需要自托管 Agent/Skill 沙盒运行环境的场景。开始前,请先完成[沙盒通用配置](./common),确保 `fastgpt-agent-sandbox-proxy` 已部署,并且 `fastgpt-app`、`fastgpt-pro` 已配置相同的 `AGENT_SANDBOX_PROXY_SECRET` 和可被浏览器访问的 `AGENT_SANDBOX_PROXY_URL`。 OpenSandbox 适合需要自托管 Agent/Skill 沙盒运行环境的场景。开始前,请先完成[沙盒通用配置](./common),确保 `fastgpt-agent-sandbox-proxy` 已部署,并且 `fastgpt-app`、`fastgpt-pro` 已配置相同的 `AGENT_SANDBOX_PROXY_SECRET` 和可被浏览器访问的 `AGENT_SANDBOX_PROXY_URL`。
下面是 OpenSandbox 部署和配置流程。 下面是 OpenSandbox 部署和配置流程。
......
...@@ -5,7 +5,7 @@ description: 'FastGPT V4.14.9 更新说明' ...@@ -5,7 +5,7 @@ description: 'FastGPT V4.14.9 更新说明'
## 升级指南 ## 升级指南
### 1. 环境变量更新 ### 1. 环境变量更新
1. 修改 FastGPT 环境变量:SANDBOX_URL 和 SANDBOX_TOKEN,改名成 CODE_SANDBOX_URL 和 CODE_SANDBOX_TOKEN: 1. 修改 FastGPT 环境变量:SANDBOX_URL 和 SANDBOX_TOKEN,改名成 CODE_SANDBOX_URL 和 CODE_SANDBOX_TOKEN:
...@@ -18,7 +18,7 @@ CODE_SANDBOX_URL=代码运行沙盒的地址 ...@@ -18,7 +18,7 @@ CODE_SANDBOX_URL=代码运行沙盒的地址
CODE_SANDBOX_TOKEN=代码运行沙盒的凭证 CODE_SANDBOX_TOKEN=代码运行沙盒的凭证
``` ```
2. 默认关闭内网安全检查,如需开启,需设置环境变量`CHECK_INTERNAL_IP=true`(fastgpt,fastgpt-pro,fastgpt-sandbox 通用变量) 2. 默认关闭内网安全检查,如需开启,需设置环境变量 `CHECK_INTERNAL_IP=true`(fastgpt,fastgpt-pro,fastgpt-sandbox 通用变量)
### 2. 更新镜像 ### 2. 更新镜像
...@@ -31,7 +31,7 @@ CODE_SANDBOX_TOKEN=代码运行沙盒的凭证 ...@@ -31,7 +31,7 @@ CODE_SANDBOX_TOKEN=代码运行沙盒的凭证
## 接口变更 ## 接口变更
`/api/core/chat/getPaginationRecords` 接口,增加返回`useAgentSandbox:boolean`字段,代表本轮对话,是否使用了虚拟机工具。即将移除`llmModuleAccount`和`historyPreviewLength`字段,如使用该字段,请尽快适配。 `/api/core/chat/getPaginationRecords` 接口,增加返回 `useAgentSandbox:boolean` 字段,代表本轮对话,是否使用了虚拟机工具。即将移除 `llmModuleAccount` 和 `historyPreviewLength` 字段,如使用该字段,请尽快适配。
## 🚀 新增内容 ## 🚀 新增内容
...@@ -44,7 +44,7 @@ CODE_SANDBOX_TOKEN=代码运行沙盒的凭证 ...@@ -44,7 +44,7 @@ CODE_SANDBOX_TOKEN=代码运行沙盒的凭证
## ⚙️ 优化 ## ⚙️ 优化
1. api 知识库同步时,增加更多 fallback 获取文件名方式。 1. API 知识库同步时,增加更多 fallback 获取文件名方式。
2. HTTP 工具,增加 SSRF 防御。 2. HTTP 工具,增加 SSRF 防御。
3. 兼容更多 MCP JsonSchema 字段,旧版无法适配混合类型字段。 3. 兼容更多 MCP JsonSchema 字段,旧版无法适配混合类型字段。
4. 优化部分工作流运行池逻辑,减少计算复杂度 4. 优化部分工作流运行池逻辑,减少计算复杂度
...@@ -62,14 +62,14 @@ CODE_SANDBOX_TOKEN=代码运行沙盒的凭证 ...@@ -62,14 +62,14 @@ CODE_SANDBOX_TOKEN=代码运行沙盒的凭证
7. 分享链接关闭状态显示后,会导致历史记录里的 AI 回复内容无法正常展示。 7. 分享链接关闭状态显示后,会导致历史记录里的 AI 回复内容无法正常展示。
8. 修复工作流预览模式下,重新打开预览弹窗,会丢失表单输入内容。 8. 修复工作流预览模式下,重新打开预览弹窗,会丢失表单输入内容。
9. 修复订阅套餐自定义字段未生效 9. 修复订阅套餐自定义字段未生效
10. login接口,存在异步 session 问题,会出现报错日志。 10. login 接口,存在异步 session 问题,会出现报错日志。
12. 修复判断器 arrayAny 类型无判断条件可选 11. 修复判断器 arrayAny 类型无判断条件可选
13. 修复视频音频自定义文件类型流程开始无文件链接变量 12. 修复视频音频自定义文件类型流程开始无文件链接变量
14. 用户输入框消息不转义成 markdown 格式 13. 用户输入框消息不转义成 Markdown 格式
15. 修复 AgentV2 部分上下文拼接错误。 14. 修复 AgentV2 部分上下文拼接错误。
16. login 接口安全风险。 15. login 接口安全风险。
17. 工作流工具未按预期连接到结束节点时,嵌套调用工作流工具会导致父工作流无法停止。 16. 工作流工具未按预期连接到结束节点时,嵌套调用工作流工具会导致父工作流无法停止。
## 代码优化 ## 🛠️ 代码优化
1. 商业版开发时,monorepo 指向不同 react 导致需重装包。 1. 商业版开发时,monorepo 指向不同 react 导致需重装包。
...@@ -74,7 +74,7 @@ INVOKE_TOKEN_SECRET= ...@@ -74,7 +74,7 @@ INVOKE_TOKEN_SECRET=
1. 修复 Agent v2 模式下,模型响应报错会导致 step 重复执行 1. 修复 Agent v2 模式下,模型响应报错会导致 step 重复执行
2. 修复知识库源文件预览和下载时文本类型响应缺少 charset 的问题。 2. 修复知识库源文件预览和下载时文本类型响应缺少 charset 的问题。
## 代码优化 ## 🛠️ 代码优化
1. 重新调整代码结构,升级 Next.js 最新版,切换至 Turbopack 构建,提高构建速度;升级容器默认 Node.js 至 24。 1. 重新调整代码结构,升级 Next.js 最新版,切换至 Turbopack 构建,提高构建速度;升级容器默认 Node.js 至 24。
2. 优化 Agent tool 声明和运行,统一所有 tool 的声明和运行方式。 2. 优化 Agent tool 声明和运行,统一所有 tool 的声明和运行方式。
......
...@@ -104,6 +104,6 @@ curl --location --request POST 'https://{{host}}/api/admin/initSandboxArchive' \ ...@@ -104,6 +104,6 @@ curl --location --request POST 'https://{{host}}/api/admin/initSandboxArchive' \
2. 工作流工具,array 和 object 类型,工具调用参数 schema 异常。 2. 工作流工具,array 和 object 类型,工具调用参数 schema 异常。
3. 发布渠道 - 门户,UI 偏移。 3. 发布渠道 - 门户,UI 偏移。
## 代码优化 ## 🛠️ 代码优化
1. 增加系统处理字符串时的长度保护,如果长度过大会停止继续同步替换,避免高 CPU 负载,可通过环境变量 `SYSTEM_MAX_STRING_LENGTH_M` 调整上限。 1. 增加系统处理字符串时的长度保护,如果长度过大会停止继续同步替换,避免高 CPU 负载,可通过环境变量 `SYSTEM_MAX_STRING_LENGTH_M` 调整上限。
...@@ -104,6 +104,6 @@ LLM 请求追踪记录(`llm_request_records`)新增 `teamId` 字段,`GET / ...@@ -104,6 +104,6 @@ LLM 请求追踪记录(`llm_request_records`)新增 `teamId` 字段,`GET /
1. chat/completions 接口,返回 nodeResponse 时候,过滤掉了 q/a/index,该版本恢复返回。 1. chat/completions 接口,返回 nodeResponse 时候,过滤掉了 q/a/index,该版本恢复返回。
## 代码优化 ## 🛠️ 代码优化
1. chat 接口抽象,不再绑定 app, 改成平台级别通用。 1. chat 接口抽象,不再绑定 app, 改成平台级别通用。
---
title: 'V4.15.1 (In Progress)'
description: 'FastGPT V4.15.1 Release Notes'
---
## 🚀 New Features
## ⚙️ Improvements
## 🐛 Bug Fixes
1. Workflow tool debugging did not show run details.
## 🛠️ Code Improvements
---
title: 'V4.15.1(进行中)'
description: 'FastGPT V4.15.1 更新说明'
---
## 🚀 新增内容
## ⚙️ 优化
## 🐛 修复
1. 工作流工具调试时,运行详情看不到。
## 🛠️ 代码优化
{ {
"title": "4.15.x", "title": "4.15.x",
"description": "", "description": "",
"pages": ["41500", "41507", "41506", "41505", "41504", "41503", "41502", "41501"] "pages": ["4151", "41500", "41507", "41506", "41505", "41504", "41503", "41502", "41501"]
} }
{ {
"title": "4.15.x", "title": "4.15.x",
"description": "", "description": "",
"pages": ["41500", "41507", "41506", "41505", "41504", "41503", "41502", "41501"] "pages": ["4151","41500", "41507", "41506", "41505", "41504", "41503", "41502", "41501"]
} }
...@@ -157,6 +157,7 @@ description: FastGPT Toc ...@@ -157,6 +157,7 @@ description: FastGPT Toc
- [/en/self-host/upgrading/4-15/41505](/en/self-host/upgrading/4-15/41505) - [/en/self-host/upgrading/4-15/41505](/en/self-host/upgrading/4-15/41505)
- [/en/self-host/upgrading/4-15/41506](/en/self-host/upgrading/4-15/41506) - [/en/self-host/upgrading/4-15/41506](/en/self-host/upgrading/4-15/41506)
- [/en/self-host/upgrading/4-15/41507](/en/self-host/upgrading/4-15/41507) - [/en/self-host/upgrading/4-15/41507](/en/self-host/upgrading/4-15/41507)
- [/en/self-host/upgrading/4-15/4151](/en/self-host/upgrading/4-15/4151)
- [/en/self-host/upgrading/outdated/40](/en/self-host/upgrading/outdated/40) - [/en/self-host/upgrading/outdated/40](/en/self-host/upgrading/outdated/40)
- [/en/self-host/upgrading/outdated/41](/en/self-host/upgrading/outdated/41) - [/en/self-host/upgrading/outdated/41](/en/self-host/upgrading/outdated/41)
- [/en/self-host/upgrading/outdated/4100](/en/self-host/upgrading/outdated/4100) - [/en/self-host/upgrading/outdated/4100](/en/self-host/upgrading/outdated/4100)
......
...@@ -160,6 +160,7 @@ description: FastGPT 文档目录 ...@@ -160,6 +160,7 @@ description: FastGPT 文档目录
- [/self-host/upgrading/4-15/41505](/self-host/upgrading/4-15/41505) - [/self-host/upgrading/4-15/41505](/self-host/upgrading/4-15/41505)
- [/self-host/upgrading/4-15/41506](/self-host/upgrading/4-15/41506) - [/self-host/upgrading/4-15/41506](/self-host/upgrading/4-15/41506)
- [/self-host/upgrading/4-15/41507](/self-host/upgrading/4-15/41507) - [/self-host/upgrading/4-15/41507](/self-host/upgrading/4-15/41507)
- [/self-host/upgrading/4-15/4151](/self-host/upgrading/4-15/4151)
- [/self-host/upgrading/outdated/40](/self-host/upgrading/outdated/40) - [/self-host/upgrading/outdated/40](/self-host/upgrading/outdated/40)
- [/self-host/upgrading/outdated/41](/self-host/upgrading/outdated/41) - [/self-host/upgrading/outdated/41](/self-host/upgrading/outdated/41)
- [/self-host/upgrading/outdated/4100](/self-host/upgrading/outdated/4100) - [/self-host/upgrading/outdated/4100](/self-host/upgrading/outdated/4100)
......
...@@ -145,8 +145,8 @@ const ChatTest = ({ isOpen, nodes = [], edges = [], onClose, chatId }: Props) => ...@@ -145,8 +145,8 @@ const ChatTest = ({ isOpen, nodes = [], edges = [], onClose, chatId }: Props) =>
/> />
)} )}
<Flex flex={'1 0 0'} alignItems={'end'} h={'100%'}> <Flex flex={'1 0 0'} minH={0} h={0} alignItems={'stretch'}>
<Box flex={'1 0 0'} h={'100%'} overflow={'auto'}> <Box flex={'1 0 0'} h={'100%'} minH={0} overflow={isPlugin ? 'hidden' : 'auto'}>
<ChatContainer /> <ChatContainer />
</Box> </Box>
......
...@@ -172,7 +172,7 @@ export const useChatTest = ({ ...@@ -172,7 +172,7 @@ export const useChatTest = ({
const CustomChatContainer = useMemoizedFn(() => const CustomChatContainer = useMemoizedFn(() =>
appDetail.type === AppTypeEnum.workflowTool ? ( appDetail.type === AppTypeEnum.workflowTool ? (
<Box p={5} pb={16}> <Box p={5} pb={16} h={'100%'} minH={0} display={'flex'} flexDirection={'column'}>
<PluginRunBox <PluginRunBox
appId={appId} appId={appId}
chatId={chatId} chatId={chatId}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment