Documentation
¶
Index ¶
- func LastAssistantIndex(msgs []chatstore.Message) int
- func MessageForAPI(m chatstore.Message, includeReasoning bool) chatstore.Message
- func MessagesForAPI(msgs []chatstore.Message) []chatstore.Message
- type AssistantToolCall
- type AssistantTurnResult
- type CompletionBackend
- type Protocol
- type SimpleCompletionRequest
- type StreamOpts
- type ToolDef
- type TurnRequest
- type UsageStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LastAssistantIndex ¶
func MessageForAPI ¶
Types ¶
type AssistantToolCall ¶
type AssistantTurnResult ¶
type AssistantTurnResult struct {
Content string
ReasoningText string
ToolCalls []AssistantToolCall
Usage UsageStats
ProxyToolCorrection string
}
type CompletionBackend ¶
type CompletionBackend interface {
Protocol() Protocol
StreamTurn(ctx context.Context, req TurnRequest, contentOut io.Writer, opts StreamOpts) (AssistantTurnResult, error)
StreamText(ctx context.Context, req SimpleCompletionRequest, contentOut io.Writer, opts StreamOpts) (string, UsageStats, error)
CompleteText(ctx context.Context, req SimpleCompletionRequest) (string, error)
ListModels(ctx context.Context) ([]string, error)
}
type SimpleCompletionRequest ¶
type StreamOpts ¶
type TurnRequest ¶
Click to show internal directories.
Click to hide internal directories.