You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[optional] Continue the conversation by sending a new message with the role of user, and a content block containing the tool_result type...
However, in practice, attempting to continue the conversation with a user message after a tool_use response without first providing the corresponding tool_result block results in an error:
Did not find 1 tool_result block(s) at the beginning of this message. Messages following tool_use blocks must begin with a matching number of tool_result blocks.
To clarify, are tool_results not actually optional? How should we think about the role of tool_result in the cases where we are using tool_use mainly to get structured outputs?
The text was updated successfully, but these errors were encountered:
The documentation for handling tool use and tool results (https://docs.anthropic.com/en/docs/build-with-claude/tool-use#handling-tool-use-and-tool-result-content-blocks) suggests that sending tool results is optional:
However, in practice, attempting to continue the conversation with a user message after a
tool_use
response without first providing the correspondingtool_result
block results in an error:To clarify, are tool_results not actually optional? How should we think about the role of tool_result in the cases where we are using tool_use mainly to get structured outputs?
The text was updated successfully, but these errors were encountered: