Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Anthropic ¶
type Anthropic struct {
// contains filtered or unexported fields
}
Anthropic implements core.Provider for the Anthropic Messages API. Supports both API key auth and OAuth tokens (Claude Max).
func New ¶
New creates an Anthropic provider. Automatically detects OAuth tokens by their "sk-ant-oat" prefix.
func NewWithBaseURL ¶
NewWithBaseURL creates an Anthropic provider with a custom base URL (for testing).
func (*Anthropic) Stream ¶
func (a *Anthropic) Stream(ctx context.Context, req core.Request) (<-chan core.AssistantEvent, error)
Stream sends a request to the Anthropic Messages API and returns a channel of normalized AssistantEvents.
Error contract:
- Returns error for pre-stream failures (bad request, auth, network).
- If channel is returned, exactly one terminal event ("done" or "error") will be sent before the channel is closed.
func (*Anthropic) SupportsDocuments ¶
SupportsDocuments returns true: Anthropic document blocks are GA for both API-key and OAuth auth.
Click to show internal directories.
Click to hide internal directories.