Documentation
¶
Overview ¶
Package chat adapts elelem's provider-neutral agent loop to chatz SSE.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamStarted ¶
StreamStarted reports whether Run emitted any stream event before err. A caller may only retry with another model when this is false: once the stream begins, a client may have displayed output and the agent may have reached a tool-capable round.
Types ¶
type Deps ¶
type Deps struct {
Client *elelem.Client
Tools ToolExecutor
Publisher *essessey.Publisher
}
type Request ¶
type Request struct {
MessageID string
ConversationID string
Model elelem.Model
Prompt elelem.Prompt
MaxRounds int
MaxContextTokens int
Params elelem.GenerationParams
OnStreamStart func()
OnAssistantDelta func(context.Context, elelem.Delta)
OnFirstDelta func(context.Context) error
OnRoundStart func(context.Context, *elelem.RoundEvent) error
OnToolCallStart func(context.Context, elelem.ToolCallEvent) error
}
Click to show internal directories.
Click to hide internal directories.