ToolMessage#
Choose message roles and distinguish model input from stored history. See the guide.
- class zett_agent.messages.ToolMessage(*, attributes=<factory>, persist=True, include_in_messages=True, tool_call_id, name, content, success=True)[源代码]#
One tool result returned to the model.
- 参数:
attributes (dict[str, Any])
persist (bool)
include_in_messages (bool)
tool_call_id (str)
name (str)
content (UserContent)
success (bool)
- tool_call_id#
Identifier of the assistant call answered by this message.
- Type:
str
- name#
Invoked tool name.
- Type:
str
- content#
Serialized result, failure text, or ordered text/image content blocks.
- success#
Whether execution succeeded; false also covers skipped calls.
- Type:
bool
- property text: str#
Plain text for search indexes; encoded image data stays in content.