fix: refix parameter for tool

This commit is contained in:
Stream
2026-01-31 21:52:37 +08:00
parent 4d82769baa
commit 03774a7bd0
3 changed files with 6 additions and 4 deletions

View File

@@ -138,12 +138,15 @@ class FunctionCallStrategy(AgentPattern):
tool_response, tool_files, _ = yield from self._handle_tool_call(
tool_name, tool_args, tool_call_id, messages, round_log
)
tool_entity = self._find_tool_by_name(tool_name)
tool_outputs[tool_name] = tool_response
# Track files produced by tools
output_files.extend(tool_files)
if tool_response == TERMINAL_OUTPUT_MESSAGE:
function_call_state = False
final_tool_args = tool_args
final_tool_args = tool_entity.transform_tool_parameters_type(
tool_args
)
yield self._finish_log(
round_log,

View File

@@ -57,7 +57,7 @@ class Tool(ABC):
tool_parameters.update(self.runtime.runtime_parameters)
# try parse tool parameters into the correct type
tool_parameters = self._transform_tool_parameters_type(tool_parameters)
tool_parameters = self.transform_tool_parameters_type(tool_parameters)
result = self._invoke(
user_id=user_id,
@@ -82,7 +82,7 @@ class Tool(ABC):
else:
return result
def _transform_tool_parameters_type(self, tool_parameters: dict[str, Any]) -> dict[str, Any]:
def transform_tool_parameters_type(self, tool_parameters: dict[str, Any]) -> dict[str, Any]:
"""
Transform tool parameters type
"""

View File

@@ -1963,7 +1963,6 @@ class LLMNode(Node[LLMNodeData]):
# Files are saved as ToolFiles with valid tool_file_id for later reference
sandbox_output_files = session.collect_output_files()
if result is None:
raise LLMNodeError("SandboxSession exited unexpectedly")