FastGPT
FastGPT copied to clipboard
fix: respect json structure while truncating tool call strings
TestGru Assignment
Summary
| Link | CommitId | Status | Reason |
|---|---|---|---|
| Detail | f79cbd514095af9c7d3deffd0b8fb501130bf799 | 🚫 Skipped | No files need to be tested {"packages/global/common/string/tools.ts":"File path does not match include patterns.","packages/service/core/workflow/dispatch/ai/agent/toolCall.ts":"File path does not match include patterns."} |
[!TIP] You can
@gru-agentand leave your feedback. TestGru will make adjustments based on your input
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Preview sandbox Image:
registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_sandbox_f8379e556f56987720ac90941b4975de78c0f4ce
Preview mcp_server Image:
registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_mcp_server_f8379e556f56987720ac90941b4975de78c0f4ce
这是啥需求
这是啥需求
在event: toolCallResponse的返回结果中,data: 后面的内容本来应该是一个合法的json,但是由于这个截断的处理逻辑太武断了,破坏了json结构。本PR的目的在于不破坏json结构的情况下裁剪数据至目标大小。
Preview fastgpt Image:
registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_f8379e556f56987720ac90941b4975de78c0f4ce
这是啥需求
在event: toolCallResponse的返回结果中,data: 后面的内容本来应该是一个合法的json,但是由于这个截断的处理逻辑太武断了,破坏了json结构。本PR的目的在于不破坏json结构的情况下裁剪数据至目标大小。
意义是什么?