Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnthropicContent ¶
AnthropicContent represents content in the Anthropic API response
type AnthropicMessage ¶
AnthropicMessage represents a message in the Anthropic API format
type AnthropicRequest ¶
type AnthropicRequest struct {
AnthropicVersion string `json:"anthropic_version"`
Messages []AnthropicMessage `json:"messages"`
MaxTokens int `json:"max_tokens"`
}
AnthropicRequest represents a request to the Anthropic API
type AnthropicResponse ¶
type AnthropicResponse struct {
ID string `json:"id"`
Type string `json:"type"`
Role string `json:"role"`
Model string `json:"model"`
Content []AnthropicContent `json:"content"`
StopReason string `json:"stop_reason"`
StopSequence *string `json:"stop_sequence"`
Usage AnthropicUsage `json:"usage"`
}
AnthropicResponse represents a response from the Anthropic API
type AnthropicResponseMessage ¶
type AnthropicResponseMessage struct {
Role string `json:"role"`
Content []AnthropicContent `json:"content"`
}
AnthropicResponseMessage represents a message in the Anthropic API response
type AnthropicUsage ¶
type AnthropicUsage struct {
InputTokens int `json:"input_tokens"`
CacheCreationInputTokens int `json:"cache_creation_input_tokens"`
CacheReadInputTokens int `json:"cache_read_input_tokens"`
OutputTokens int `json:"output_tokens"`
}
AnthropicUsage represents usage information in the Anthropic API response
Click to show internal directories.
Click to hide internal directories.