Skip to main content

Module anthropic

Module anthropic 

Source
Expand description

Anthropic Messages API response shapes.

Tool calls are type: "tool_use" content blocks with an input object and a mandatory id; a tool-calling turn ends with stop_reason: "tool_use" (https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview).

Functionsยง

text_response
Assistant text response (stop_reason: "end_turn").
tool_use
A tool_use content block.
tool_use_response
Assistant tool-use response (stop_reason: "tool_use").