Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/application/workflow/nodes/ai_chat_node/ai_chat_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def execute(self):
chat_id,
workspace_id,
workflow_type,
is_result,
is_result=is_result,
)
if not mcp_handled:
message_list_with_system = [SystemMessage(system)] + message_list
Expand Down Expand Up @@ -490,7 +490,6 @@ def _handle_mcp(
chat_id,
workspace_id,
workflow_type,
text_content_id,
is_result=False,
):
# 工具记录来源(source_type / source_id)
Expand All @@ -515,7 +514,7 @@ def _handle_mcp(
if tools or mcp_servers_config or skill_tool_ids:
node_info = NodeInfo(self.get_node_id(), self.get_node_name(), Status.RUNNING)
# 使用可变状态在回调间共享(answer 累积、当前文本 content id、工具 content id 映射)
state = {"answer": "", "text_id": text_content_id, "tool_id_map": {}}
state = {"answer": ""}
tool_stream = ToolCallStreamManagement()
node_info = NodeInfo(self.get_node_id(), self.get_node_name(), Status.RUNNING)

Expand Down Expand Up @@ -592,6 +591,7 @@ def on_next(chunk):
)
)
else:
state["answer"] = state["answer"] + chunk.content
if is_result and chunk.content:
self.write(
TextContent(
Expand Down
Loading