Documentation
¶
Overview ¶
Package dispatch runs one tool call: through the ToolExecutor, or through the pause handler registered for that tool.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct {
Executor Executor
Handlers map[string]pause.Handler // tool name → handler, in place of Executor
Emitter Emitter
History History
Caller ModelCaller
Replies ReplyWaiter
Ender Ender
Model model.ToolCallingChatModel
Tools []*schema.ToolInfo
Logger *slog.Logger
}
Deps is everything a Dispatcher works with. wire.go fills it.
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func New ¶
func New(d Deps) *Dispatcher
type Ender ¶
type Ender interface {
EndAwaitingHuman(awaiting event.AwaitingInputData)
EndStopped()
}
Ender ends the run when a pause handler says to. → engine.Finisher
type Executor ¶
type Executor interface {
ExecuteTool(ctx context.Context, name, arguments string) (string, error)
}
Executor runs a tool. → the caller's loop.ToolExecutor
Click to show internal directories.
Click to hide internal directories.