xai

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginTitle   = "rtp-agent.plugins.xai"
	PluginVersion = "1.5.15"
	PluginPackage = "rtp-agent.plugins.xai"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSearchTool

type FileSearchTool struct {
	VectorStoreIDs []string
	MaxNumResults  int
}

func (*FileSearchTool) Description

func (t *FileSearchTool) Description() string

func (*FileSearchTool) Execute

func (t *FileSearchTool) Execute(ctx context.Context, args string) (string, error)

func (*FileSearchTool) ID

func (t *FileSearchTool) ID() string

func (*FileSearchTool) Name

func (t *FileSearchTool) Name() string

func (*FileSearchTool) Parameters

func (t *FileSearchTool) Parameters() map[string]any

type WebSearchTool

type WebSearchTool struct{}

XAITool implementations

func (*WebSearchTool) Description

func (t *WebSearchTool) Description() string

func (*WebSearchTool) Execute

func (t *WebSearchTool) Execute(ctx context.Context, args string) (string, error)

func (*WebSearchTool) ID

func (t *WebSearchTool) ID() string

func (*WebSearchTool) Name

func (t *WebSearchTool) Name() string

func (*WebSearchTool) Parameters

func (t *WebSearchTool) Parameters() map[string]any

type XSearchTool

type XSearchTool struct{ AllowedHandles []string }

func (*XSearchTool) Description

func (t *XSearchTool) Description() string

func (*XSearchTool) Execute

func (t *XSearchTool) Execute(ctx context.Context, args string) (string, error)

func (*XSearchTool) ID

func (t *XSearchTool) ID() string

func (*XSearchTool) Name

func (t *XSearchTool) Name() string

func (*XSearchTool) Parameters

func (t *XSearchTool) Parameters() map[string]any

type XaiLLM

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

func NewXaiLLM

func NewXaiLLM(apiKey string, model string) *XaiLLM

func (*XaiLLM) Chat

func (l *XaiLLM) Chat(ctx context.Context, chatCtx *llm.ChatContext, opts ...llm.ChatOption) (llm.LLMStream, error)

func (*XaiLLM) Model added in v0.0.15

func (l *XaiLLM) Model() string

type XaiSTT added in v0.0.15

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

func NewXaiSTT added in v0.0.15

func NewXaiSTT(apiKey string, opts ...XaiSTTOption) *XaiSTT

func (*XaiSTT) Capabilities added in v0.0.15

func (s *XaiSTT) Capabilities() stt.STTCapabilities

func (*XaiSTT) Label added in v0.0.15

func (s *XaiSTT) Label() string

func (*XaiSTT) Recognize added in v0.0.15

func (s *XaiSTT) Recognize(ctx context.Context, frames []*model.AudioFrame, language string) (*stt.SpeechEvent, error)

func (*XaiSTT) Stream added in v0.0.15

func (s *XaiSTT) Stream(ctx context.Context, language string) (stt.RecognizeStream, error)

type XaiSTTOption added in v0.0.15

type XaiSTTOption func(*XaiSTT)

func WithXaiSTTDiarization added in v0.0.15

func WithXaiSTTDiarization(enabled bool) XaiSTTOption

func WithXaiSTTEndpointing added in v0.0.15

func WithXaiSTTEndpointing(endpointing int) XaiSTTOption

func WithXaiSTTInterimResults added in v0.0.15

func WithXaiSTTInterimResults(enabled bool) XaiSTTOption

func WithXaiSTTLanguage added in v0.0.15

func WithXaiSTTLanguage(language string) XaiSTTOption

func WithXaiSTTRestURL added in v0.0.15

func WithXaiSTTRestURL(restURL string) XaiSTTOption

func WithXaiSTTSampleRate added in v0.0.15

func WithXaiSTTSampleRate(sampleRate int) XaiSTTOption

func WithXaiSTTWebsocketURL added in v0.0.15

func WithXaiSTTWebsocketURL(websocketURL string) XaiSTTOption

type XaiTTS added in v0.0.15

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

func NewXaiTTS added in v0.0.15

func NewXaiTTS(apiKey string, voice string, opts ...XaiTTSOption) *XaiTTS

func (*XaiTTS) Capabilities added in v0.0.15

func (t *XaiTTS) Capabilities() tts.TTSCapabilities

func (*XaiTTS) Label added in v0.0.15

func (t *XaiTTS) Label() string

func (*XaiTTS) Model added in v0.0.18

func (t *XaiTTS) Model() string

func (*XaiTTS) NumChannels added in v0.0.15

func (t *XaiTTS) NumChannels() int

func (*XaiTTS) Provider added in v0.0.18

func (t *XaiTTS) Provider() string

func (*XaiTTS) SampleRate added in v0.0.15

func (t *XaiTTS) SampleRate() int

func (*XaiTTS) Stream added in v0.0.15

func (t *XaiTTS) Stream(ctx context.Context) (tts.SynthesizeStream, error)

func (*XaiTTS) Synthesize added in v0.0.15

func (t *XaiTTS) Synthesize(ctx context.Context, text string) (tts.ChunkedStream, error)

type XaiTTSOption added in v0.0.15

type XaiTTSOption func(*XaiTTS)

func WithXaiTTSLanguage added in v0.0.15

func WithXaiTTSLanguage(language string) XaiTTSOption

func WithXaiTTSWebsocketURL added in v0.0.15

func WithXaiTTSWebsocketURL(websocketURL string) XaiTTSOption

Jump to

Keyboard shortcuts

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