Message for passing the result of executing a tool back to a model.
FunctionMessage are an older version of the ToolMessage schema, and
do not contain the tool_call_id field.
The tool_call_id field is used to associate the tool call request with the
tool call response. Useful in situations where a chat model is able
to request multiple tool calls in parallel.
FunctionMessage(
self,
content: str | list[str | dict] | None = None,
content_blocks: list[types.ContentBlock] | None = None,
**kwargs: Any = {}
)The contents of the message.
Reserved for additional payload data associated with the message.
Examples: response headers, logprobs, token counts, model name.
An optional unique identifier for the message.
Load content blocks from the message content.
Get the text content of the message as a string.