Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioStream ¶ added in v0.3.2
func NewAudioStream ¶ added in v0.3.2
func NewAudioStream( logger *slog.Logger, device *portaudio.DeviceInfo, callback func([]float32), ) (AudioStream, error)
type Command ¶
func NewCommand ¶
type Console ¶
type Console interface {
Exec(context.Context, *Command) (ExecResult, error)
}
func NewBashConsole ¶
func NewBashConsole() Console
type ExecResult ¶
func (ExecResult) Success ¶
func (e ExecResult) Success() bool
type FileKnowledgeBase ¶ added in v0.3.2
type FileKnowledgeBase struct {
// contains filtered or unexported fields
}
func NewFileKnowledgeBase ¶ added in v0.3.2
func NewFileKnowledgeBase(repositoryPath string) *FileKnowledgeBase
func (*FileKnowledgeBase) Close ¶ added in v0.3.2
func (f *FileKnowledgeBase) Close() error
func (*FileKnowledgeBase) QueryAll ¶ added in v0.3.2
func (f *FileKnowledgeBase) QueryAll() (string, error)
type InputHandler ¶
type InputHandler interface { Read(ctx context.Context, defaultValue string) (string, error) WithVoiceInput( voiceInputCh chan string, audioStartCh <-chan struct{}, audioEndCh <-chan struct{}, inputStream *audio.StreamHandler, ) }
TODO(nullswan): Handle Command handling
func NewInputHandler ¶
func NewInputHandler( logger *slog.Logger, ) InputHandler
type KnowledgeBase ¶ added in v0.3.2
type Selector ¶
type Selector interface { SelectBool(title string, defaultValue bool) bool SelectString(title string, items []string) string }
func NewSelector ¶
func NewSelector() Selector
type TextToJSONBackend ¶
type TextToJSONBackend struct {
// contains filtered or unexported fields
}
func NewTextToJSONBackend ¶
func NewTextToJSONBackend( backend baseprovider.TextToJSONProvider, logger *slog.Logger, ) TextToJSONBackend
func (TextToJSONBackend) Do ¶
func (t TextToJSONBackend) Do( ctx context.Context, conversation chat.Conversation, ) (string, error)
type TextToSpeechBackend ¶ added in v0.2.3
type TextToSpeechBackend struct {
// contains filtered or unexported fields
}
func NewTextToSpeechBackend ¶ added in v0.2.3
func NewTextToSpeechBackend( backend baseprovider.TextToSpeechProvider, logger *slog.Logger, ) *TextToSpeechBackend
type TextToTextBackend ¶
type TextToTextBackend struct {
// contains filtered or unexported fields
}
func NewTextToTextBackend ¶
func NewTextToTextBackend( backend baseprovider.TextToTextProvider, logger *slog.Logger, ) TextToTextBackend
func (TextToTextBackend) Do ¶
func (t TextToTextBackend) Do( ctx context.Context, conversation chat.Conversation, ) (string, error)
type VoiceInput ¶
type VoiceInput struct {
// contains filtered or unexported fields
}
func NewVoiceInput ¶
func (*VoiceInput) Close ¶
func (v *VoiceInput) Close()
func (*VoiceInput) GetAudioEndCh ¶
func (v *VoiceInput) GetAudioEndCh() <-chan struct{}
func (*VoiceInput) GetAudioStartCh ¶
func (v *VoiceInput) GetAudioStartCh() <-chan struct{}
func (*VoiceInput) GetInputStream ¶
func (v *VoiceInput) GetInputStream() *audio.StreamHandler
Click to show internal directories.
Click to hide internal directories.