Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheControl ¶
type CacheControl struct {
Type string `json:"type"` // "ephemeral"
}
CacheControl marks a content block for LLM-side prefix caching. Currently only "ephemeral" is supported (used by Anthropic).
type ContentBlock ¶
type ContentBlock struct {
Type string `json:"type"` // "text"
Text string `json:"text"`
CacheControl *CacheControl `json:"cache_control,omitempty"`
}
ContentBlock represents a structured segment of a system message. Adapters that understand SystemParts can use these blocks to set per-block cache control (e.g. Anthropic's cache_control: ephemeral).
type ExtraContent ¶
type ExtraContent struct {
Google *GoogleExtra `json:"google,omitempty"`
}
type FunctionCall ¶
type GoogleExtra ¶
type GoogleExtra struct {
ThoughtSignature string `json:"thought_signature,omitempty"`
}
type LLMResponse ¶
type LLMResponse struct {
Content string `json:"content"`
ReasoningContent string `json:"reasoning_content,omitempty"`
ToolCalls []ToolCall `json:"tool_calls,omitempty"`
FinishReason string `json:"finish_reason"`
Usage *UsageInfo `json:"usage,omitempty"`
Reasoning string `json:"reasoning"`
ReasoningDetails []ReasoningDetail `json:"reasoning_details"`
}
type Message ¶
type Message struct {
Role string `json:"role"`
Content string `json:"content"`
Media []string `json:"media,omitempty"`
ReasoningContent string `json:"reasoning_content,omitempty"`
SystemParts []ContentBlock `json:"system_parts,omitempty"` // structured system blocks for cache-aware adapters
ToolCalls []ToolCall `json:"tool_calls,omitempty"`
ToolCallID string `json:"tool_call_id,omitempty"`
}
type ReasoningDetail ¶
type ToolCall ¶
type ToolCall struct {
ID string `json:"id"`
Type string `json:"type,omitempty"`
Function *FunctionCall `json:"function,omitempty"`
Name string `json:"-"`
Arguments map[string]any `json:"-"`
ThoughtSignature string `json:"-"` // Internal use only
ExtraContent *ExtraContent `json:"extra_content,omitempty"`
}
type ToolDefinition ¶
type ToolDefinition struct {
Type string `json:"type"`
Function ToolFunctionDefinition `json:"function"`
}
type ToolFunctionDefinition ¶
Click to show internal directories.
Click to hide internal directories.