Documentation
¶
Overview ¶
Package assist provides an embeddable Assist Mode service.
Assist is the one-shot pipeline: speech (or text) in, a single useful result out (codeword, deterministic utility, or LLM generation), with optional TTS playback. It is the middle of the three SpeechKit modes (Dictation < Assist < Voice Agent) and the right surface when the user wants an answer back, not a transcript and not a dialogue.
Construct an instance with [New], passing a generator (LLM) and/or a tool executor plus the strict-mode policy fields from the host config.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingHandler = errors.New("speechkit assist: generator or tool executor is required") ErrCleanModeNeedsUtility = errors.New("speechkit assist: clean mode requires a matched deterministic utility") )
Functions ¶
This section is empty.
Types ¶
type GenerateFunc ¶
type GenerateFunc func(context.Context, speechkit.AssistRequest) (speechkit.AssistResult, error)
func (GenerateFunc) GenerateAssist ¶
func (f GenerateFunc) GenerateAssist(ctx context.Context, req speechkit.AssistRequest) (speechkit.AssistResult, error)
type Generator ¶
type Generator interface {
GenerateAssist(context.Context, speechkit.AssistRequest) (speechkit.AssistResult, error)
}
type Options ¶
type Options struct {
Behavior speechkit.ModeBehavior
Generator Generator
Matcher ToolMatcher
Executor ToolExecutor
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) Process ¶
func (s *Service) Process(ctx context.Context, req speechkit.AssistRequest) (speechkit.AssistResult, error)
type ToolExecutor ¶
type ToolExecutor interface {
ExecuteTool(context.Context, ToolCall) (ToolResult, error)
}
type ToolExecutorFunc ¶
type ToolExecutorFunc func(context.Context, ToolCall) (ToolResult, error)
func (ToolExecutorFunc) ExecuteTool ¶
func (f ToolExecutorFunc) ExecuteTool(ctx context.Context, call ToolCall) (ToolResult, error)
type ToolMatcher ¶
type ToolMatcherFunc ¶
func (ToolMatcherFunc) MatchTool ¶
func (f ToolMatcherFunc) MatchTool(ctx context.Context, req speechkit.AssistRequest) (ToolCall, bool, error)
type ToolResult ¶
Click to show internal directories.
Click to hide internal directories.