assist

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package assist provides an embeddable Assist service constructor.

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 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 NewService(opts Options) (*Service, error)

func (*Service) Process

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
}

Jump to

Keyboard shortcuts

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