Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssistantContentUpdated ¶
type AssistantContentUpdated struct {
TurnID domain.MessageID // user message ID that started this turn
Message domain.Message
}
AssistantContentUpdated is fired as the assistant message streams in.
type AssistantMessageCreated ¶
AssistantMessageCreated is fired after the assistant message is persisted.
type ConversationCreated ¶
type ConversationCreated struct {
ConversationID domain.ConversationID
}
ConversationCreated is fired when a new conversation is created.
type RoundStarted ¶
type RoundStarted struct {
RoundID domain.MessageID
ConversationID domain.ConversationID
}
RoundStarted is fired when a new round begins.
type StreamCompleted ¶
type StreamCompleted struct {
TurnID domain.MessageID // user message ID that started this turn
Message domain.Message
StopReason string
Title string // AI-generated conversation title, if provided
ContextWindow int // model's max token capacity
InputTokens int // tokens consumed by input this turn
OutputTokens int // tokens generated by output this turn
}
StreamCompleted is fired when the assistant stream finishes.
type StreamFailed ¶ added in v1.11.0
type StreamFailed struct {
TurnID domain.MessageID // user message ID that started this turn
Err error
}
StreamFailed is fired when the assistant stream encounters an error.
type ToolCompleted ¶
type ToolCompleted struct {
ToolUseID string
Result domaintools.Result
Error error
}
ToolCompleted is fired when any tool finishes executing.
func (ToolCompleted) GetError ¶
func (m ToolCompleted) GetError() error
GetError returns the execution error, if any.
func (ToolCompleted) GetResult ¶
func (m ToolCompleted) GetResult() domaintools.Result
GetResult returns the tool result, wrapping the error if present.
func (ToolCompleted) GetToolUseID ¶
func (m ToolCompleted) GetToolUseID() string
GetToolUseID returns the tool use ID.
type ToolResultsReady ¶
type ToolResultsReady struct {
TurnID domain.MessageID // identifies which turn completed
Results []domaintools.Result // collected tool results
}
ToolResultsReady is fired by a turn when all tool results are collected. This is internal to round - it triggers the next turn in the tool loop.
type TurnStarted ¶
type TurnStarted struct {
UserMessageID domain.MessageID
ConversationID domain.ConversationID
}
TurnStarted is fired when a new turn begins within a round.
type UserSubmittedInput ¶
type UserSubmittedInput struct {
Text string
ToolResults []domaintools.Result
}
UserSubmittedInput is fired when user input is ready (text from input bar or tool results).