Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
*core.BaseClient
}
Client is an Anthropic (Claude) LLM client.
It implements the core.Client interface and provides access to Anthropic's Claude models (Claude 3 Opus, Sonnet, Haiku, etc.).
The client handles Anthropic-specific API requirements including the anthropic-version header, x-api-key authentication, and Claude's unique message format with separate system prompts.
Tool calling is fully supported in both streaming and non-streaming modes, aligned with OpenAI/DeepSeek/Ollama provider behavior:
- Tools are sent via the tools field (input_schema, not parameters)
- Tool calls arrive as tool_use content blocks
- Tool results are sent back as tool_result content blocks
- Streaming uses content_block_start/delta/stop events
- stop_reason "tool_use" is mapped to "tool_calls" for cross-provider parity
Click to show internal directories.
Click to hide internal directories.