fix agent putout the output of workflow-tool twice (#26835) (#27087)

This commit is contained in:
red_sun
2025-11-06 09:41:05 +08:00
committed by GitHub
parent f627348b11
commit 61a0fcc2ea
4 changed files with 8 additions and 3 deletions

View File

@@ -210,12 +210,13 @@ class Tool(ABC):
meta=meta,
)
def create_json_message(self, object: dict) -> ToolInvokeMessage:
def create_json_message(self, object: dict, suppress_output: bool = False) -> ToolInvokeMessage:
"""
create a json message
"""
return ToolInvokeMessage(
type=ToolInvokeMessage.MessageType.JSON, message=ToolInvokeMessage.JsonMessage(json_object=object)
type=ToolInvokeMessage.MessageType.JSON,
message=ToolInvokeMessage.JsonMessage(json_object=object, suppress_output=suppress_output),
)
def create_variable_message(