Documentation
¶
Overview ¶
Package anthropic provides an Anthropic Claude LLM implementation.
This implementation is strictly aligned with ADK-Go's model architecture:
- Unified GenerateContent method with stream boolean
- Returns iter.Seq2[*Response, error]
- Uses StreamingAggregator for streaming with Partial flag
- Proper handling of thinking blocks with signatures
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an Anthropic LLM implementation. Implements model.LLM interface aligned with ADK-Go.
func (*Client) GenerateContent ¶
func (c *Client) GenerateContent(ctx context.Context, req *model.Request, stream bool) iter.Seq2[*model.Response, error]
GenerateContent produces responses for the given request. This is the ADK-Go aligned interface.
When stream=false:
- Yields exactly one Response with complete content, Partial=false
When stream=true:
- Yields multiple partial Responses (Partial=true) for real-time UI updates
- Finally yields aggregated Response (Partial=false) for session persistence
Click to show internal directories.
Click to hide internal directories.