Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptyCompletion = errors.New("provider returned no assistant content or tool calls")
ErrEmptyCompletion marks a terminal completion that carried no assistant content and no tool calls (e.g. a reasoning-only response). Providers wrap their terminal-empty errors with this so callers can recognize the case without depending on provider-internal error types.
Functions ¶
This section is empty.
Types ¶
type EventType ¶
type EventType string
const ( EventContentDelta EventType = "content_delta" EventReasoningDelta EventType = "reasoning_delta" EventToolArgsDelta EventType = "tool_args_delta" EventToolUseStart EventType = "tool_use_start" EventToolUseStop EventType = "tool_use_stop" EventRetryScheduled EventType = "retry_scheduled" EventComplete EventType = "complete" EventError EventType = "error" )
type PrefixCompletionProvider ¶ added in v0.1.35
type ProviderEvent ¶
type ProviderEvent struct {
Type EventType
Content string
ReasoningDelta string
ToolArgsDelta *ToolArgsDelta
ToolCall *core.ToolCall
Retry *llmretry.Info
Response *ProviderResponse
Err error
}
type ProviderResponse ¶
type ToolArgsDelta ¶
type Usage ¶
type Usage struct {
PromptTokens int
CompletionTokens int
TotalTokens int
PromptCacheHitTokens int
PromptCacheMissTokens int
PrefixCompletionRequests int
ReasoningReplayTokens int
ToolResultRawChars int
ToolResultReplayChars int
ToolResultRawTokens int
ToolResultReplayTokens int
ToolResultTokensSaved int
ToolResultsCompacted int
}
Click to show internal directories.
Click to hide internal directories.