tinker_cookbook.tool_use.simple_tool_result
tinker_cookbook.tool_use.simple_tool_result(content, call_id, name, should_stop, metrics, metadata)
Helper function to create a ToolResult from content.
Parameters:
- content (str | list[ContentPart]) – Content to return to the model — a string or list of ContentPart.
- call_id (str) – The tool call ID (usually passed from ToolInput).
- name (str) – The tool name (usually self.name in a tool method).
- should_stop (bool) – Whether to stop the episode after this tool call.
- metrics (dict[str, float] | None) – Optional metrics dict (e.g., {"latency": 0.5, "count": 1}).
- metadata (dict[str, Any] | None) – Optional metadata dict for debugging.
Returns: A ToolResult with the given content and options.