assist

package
v0.52.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2026 License: Apache-2.0 Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 FollowupState added in v0.40.1

type FollowupState map[string]string

FollowupState carries skill-private multi-turn state without making ToolResult non-comparable for existing SDK consumers.

func NewFollowupState added in v0.40.1

func NewFollowupState(values map[string]string) *FollowupState

func (*FollowupState) Map added in v0.40.1

func (s *FollowupState) Map() map[string]string

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
	SkillContexts SkillContextStore
	TTSRouter     TTSRouter
	TTSEnabled    bool
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(opts Options) (*Service, error)

func (*Service) Process

type SkillContext added in v0.40.1

type SkillContext struct {
	Intent    string
	State     map[string]string
	ExpiresAt time.Time
}

type SkillContextStore added in v0.40.1

type SkillContextStore interface {
	Get(key string) (SkillContext, bool)
	Set(key string, intent string, state map[string]string)
	Clear(key string)
}

type TTSRouter added in v0.40.1

type TTSRouter interface {
	Synthesize(context.Context, string, tts.SynthesizeOpts) (*tts.Result, error)
}

type ToolCall

type ToolCall struct {
	Intent    string
	Payload   string
	Locale    string
	Selection string
	Context   string
	Target    any
}

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 ToolMatcher interface {
	MatchTool(context.Context, speechkit.AssistRequest) (ToolCall, bool, error)
}

type ToolMatcherFunc

type ToolMatcherFunc func(context.Context, speechkit.AssistRequest) (ToolCall, bool, error)

func (ToolMatcherFunc) MatchTool

type ToolResult

type ToolResult struct {
	Text           string
	SpeakText      string
	Action         string
	Kind           string
	Surface        speechkit.AssistSurfaceDecision
	Locale         string
	MessageID      localization.MessageID
	ReasonCode     string
	FollowupNeeded bool
	FollowupState  *FollowupState
}

Directories

Path Synopsis
Package genkitadapter keeps Genkit-specific Assist wiring out of the core public assist package.
Package genkitadapter keeps Genkit-specific Assist wiring out of the core public assist package.
Package skills exposes SpeechKit's Voice-Companion skill catalog — Time, Date, Math, Weather, Timer, Reminder, Wikipedia, plus a fail-closed Home Assistant boundary — as a public assist.ToolMatcher + assist.ToolExecutor pair, ready to plug into an assist.Service.
Package skills exposes SpeechKit's Voice-Companion skill catalog — Time, Date, Math, Weather, Timer, Reminder, Wikipedia, plus a fail-closed Home Assistant boundary — as a public assist.ToolMatcher + assist.ToolExecutor pair, ready to plug into an assist.Service.
Package toolbridge adapts Assist-mode tools (assist.ToolMatcher / assist.ToolExecutor — the deterministic skill layer, e.g.
Package toolbridge adapts Assist-mode tools (assist.ToolMatcher / assist.ToolExecutor — the deterministic skill layer, e.g.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL