aws

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginTitle   = "rtp-agent.plugins.aws"
	PluginVersion = "v0.4.2"
	PluginPackage = "rtp-agent.plugins.aws"
)
View Source
const (
	AWSRealtimeModelNovaSonic1     = "amazon.nova-sonic-v1:0"
	AWSRealtimeModelNovaSonic2     = "amazon.nova-2-sonic-v1:0"
	AWSRealtimeModalitiesAudio     = "audio"
	AWSRealtimeModalitiesMixed     = "mixed"
	AWSRealtimeTurnDetectionHigh   = "HIGH"
	AWSRealtimeTurnDetectionMedium = "MEDIUM"
	AWSRealtimeTurnDetectionLow    = "LOW"
)

Variables

This section is empty.

Functions

func AWSRealtimeSonic1Voices added in v0.1.5

func AWSRealtimeSonic1Voices() []string

func AWSRealtimeSonic2Voices added in v0.1.5

func AWSRealtimeSonic2Voices() []string

Types

type AWSCredentials added in v0.1.5

type AWSCredentials struct {
	AccessKeyID     string
	SecretAccessKey string
	SessionToken    string
}

type AWSLLM deprecated

type AWSLLM = LLM

Deprecated: use LLM.

type AWSLLMOption deprecated added in v0.1.5

type AWSLLMOption = LLMOption

Deprecated: use LLMOption.

type AWSRealtimeModel deprecated added in v0.1.5

type AWSRealtimeModel = RealtimeModel

Deprecated: use RealtimeModel.

type AWSRealtimeOption deprecated added in v0.1.5

type AWSRealtimeOption = RealtimeOption

Deprecated: use RealtimeOption.

type AWSSTT deprecated

type AWSSTT = STT

Deprecated: use STT.

type AWSSTTOption deprecated added in v0.0.15

type AWSSTTOption = STTOption

Deprecated: use STTOption.

type AWSTTS deprecated

type AWSTTS = TTS

Deprecated: use TTS.

type AWSTTSOption deprecated added in v0.0.15

type AWSTTSOption = TTSOption

Deprecated: use TTSOption.

type LLM added in v0.4.2

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

func NewAWSLLM deprecated

func NewAWSLLM(ctx context.Context, region string, model string, providerOpts ...LLMOption) (*LLM, error)

Deprecated: use NewLLM.

func NewLLM added in v0.4.2

func NewLLM(ctx context.Context, region string, model string, providerOpts ...LLMOption) (*LLM, error)

func (*LLM) AdditionalRequestFields added in v0.4.2

func (l *LLM) AdditionalRequestFields() any

func (*LLM) CacheSystem added in v0.4.2

func (l *LLM) CacheSystem() bool

func (*LLM) CacheTools added in v0.4.2

func (l *LLM) CacheTools() bool

func (*LLM) Chat added in v0.4.2

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

func (*LLM) Label added in v0.4.2

func (l *LLM) Label() string

func (*LLM) MaxOutputTokens added in v0.4.2

func (l *LLM) MaxOutputTokens() (int32, bool)

func (*LLM) Model added in v0.4.2

func (l *LLM) Model() string

func (*LLM) Provider added in v0.4.2

func (l *LLM) Provider() string

func (*LLM) Temperature added in v0.4.2

func (l *LLM) Temperature() (float32, bool)

func (*LLM) ToolChoice added in v0.4.2

func (l *LLM) ToolChoice() llm.ToolChoice

func (*LLM) TopP added in v0.4.2

func (l *LLM) TopP() (float32, bool)

type LLMOption added in v0.4.2

type LLMOption func(*LLM)

func WithAWSLLMAdditionalRequestFields added in v0.1.5

func WithAWSLLMAdditionalRequestFields(fields any) LLMOption

func WithAWSLLMCacheSystem added in v0.1.5

func WithAWSLLMCacheSystem(cache bool) LLMOption

func WithAWSLLMCacheTools added in v0.1.5

func WithAWSLLMCacheTools(cache bool) LLMOption

func WithAWSLLMCredentials added in v0.1.5

func WithAWSLLMCredentials(creds AWSCredentials) LLMOption

func WithAWSLLMMaxOutputTokens added in v0.1.5

func WithAWSLLMMaxOutputTokens(maxOutputTokens int32) LLMOption

func WithAWSLLMTemperature added in v0.1.5

func WithAWSLLMTemperature(temperature float32) LLMOption

func WithAWSLLMToolChoice added in v0.1.5

func WithAWSLLMToolChoice(toolChoice llm.ToolChoice) LLMOption

func WithAWSLLMTopP added in v0.1.5

func WithAWSLLMTopP(topP float32) LLMOption

type RealtimeModel added in v0.4.2

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

func NewAWSRealtimeModel deprecated added in v0.1.5

func NewAWSRealtimeModel(model string, opts ...RealtimeOption) *RealtimeModel

Deprecated: use NewRealtimeModel.

func NewAWSRealtimeModelWithNovaSonic1 added in v0.1.5

func NewAWSRealtimeModelWithNovaSonic1(opts ...RealtimeOption) *RealtimeModel

func NewAWSRealtimeModelWithNovaSonic2 added in v0.1.5

func NewAWSRealtimeModelWithNovaSonic2(opts ...RealtimeOption) *RealtimeModel

func NewRealtimeModel added in v0.4.2

func NewRealtimeModel(model string, opts ...RealtimeOption) *RealtimeModel

func (*RealtimeModel) Capabilities added in v0.4.2

func (m *RealtimeModel) Capabilities() llm.RealtimeCapabilities

func (*RealtimeModel) Close added in v0.4.2

func (m *RealtimeModel) Close() error

func (*RealtimeModel) GenerateReplyTimeout added in v0.4.2

func (m *RealtimeModel) GenerateReplyTimeout() time.Duration

func (*RealtimeModel) Label added in v0.4.2

func (m *RealtimeModel) Label() string

func (*RealtimeModel) MaxTokens added in v0.4.2

func (m *RealtimeModel) MaxTokens() (int, bool)

func (*RealtimeModel) Modalities added in v0.4.2

func (m *RealtimeModel) Modalities() string

func (*RealtimeModel) Model added in v0.4.2

func (m *RealtimeModel) Model() string

func (*RealtimeModel) Provider added in v0.4.2

func (m *RealtimeModel) Provider() string

func (*RealtimeModel) Region added in v0.4.2

func (m *RealtimeModel) Region() string

func (*RealtimeModel) Session added in v0.4.2

func (m *RealtimeModel) Session() (llm.RealtimeSession, error)

func (*RealtimeModel) Temperature added in v0.4.2

func (m *RealtimeModel) Temperature() (float64, bool)

func (*RealtimeModel) ToolChoice added in v0.4.2

func (m *RealtimeModel) ToolChoice() llm.ToolChoice

func (*RealtimeModel) TopP added in v0.4.2

func (m *RealtimeModel) TopP() (float64, bool)

func (*RealtimeModel) TurnDetection added in v0.4.2

func (m *RealtimeModel) TurnDetection() string

func (*RealtimeModel) Voice added in v0.4.2

func (m *RealtimeModel) Voice() string

type RealtimeOption added in v0.4.2

type RealtimeOption func(*RealtimeModel)

func WithAWSRealtimeClient added in v0.1.5

func WithAWSRealtimeClient(client awsRealtimeClient) RealtimeOption

func WithAWSRealtimeCredentialExpiry added in v0.1.5

func WithAWSRealtimeCredentialExpiry(expiry func() (time.Time, bool)) RealtimeOption

func WithAWSRealtimeGenerateReplyTimeout added in v0.1.5

func WithAWSRealtimeGenerateReplyTimeout(timeout time.Duration) RealtimeOption

func WithAWSRealtimeMaxSessionDuration added in v0.1.5

func WithAWSRealtimeMaxSessionDuration(duration time.Duration) RealtimeOption

func WithAWSRealtimeMaxTokens added in v0.1.5

func WithAWSRealtimeMaxTokens(maxTokens int) RealtimeOption

func WithAWSRealtimeModel added in v0.1.5

func WithAWSRealtimeModel(model string) RealtimeOption

func WithAWSRealtimeRegion added in v0.1.5

func WithAWSRealtimeRegion(region string) RealtimeOption

func WithAWSRealtimeTemperature added in v0.1.5

func WithAWSRealtimeTemperature(temperature float64) RealtimeOption

func WithAWSRealtimeToolChoice added in v0.1.5

func WithAWSRealtimeToolChoice(toolChoice llm.ToolChoice) RealtimeOption

func WithAWSRealtimeTopP added in v0.1.5

func WithAWSRealtimeTopP(topP float64) RealtimeOption

func WithAWSRealtimeTurnDetection added in v0.1.5

func WithAWSRealtimeTurnDetection(turnDetection string) RealtimeOption

func WithAWSRealtimeVoice added in v0.1.5

func WithAWSRealtimeVoice(voice string) RealtimeOption

type STT added in v0.4.2

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

func NewAWSSTT deprecated

func NewAWSSTT(ctx context.Context, region string, providerOpts ...STTOption) (*STT, error)

Deprecated: use NewSTT.

func NewSTT added in v0.4.2

func NewSTT(ctx context.Context, region string, providerOpts ...STTOption) (*STT, error)

func (*STT) Capabilities added in v0.4.2

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

func (*STT) Close added in v0.4.2

func (s *STT) Close() error

func (*STT) InputSampleRate added in v0.4.2

func (s *STT) InputSampleRate() uint32

func (*STT) Label added in v0.4.2

func (s *STT) Label() string

func (*STT) Language added in v0.4.2

func (s *STT) Language() string

func (*STT) Model added in v0.4.2

func (s *STT) Model() string

func (*STT) Provider added in v0.4.2

func (s *STT) Provider() string

func (*STT) Recognize added in v0.4.2

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

func (*STT) Stream added in v0.4.2

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

type STTOption added in v0.4.2

type STTOption func(*STT)

func WithAWSSTTCredentials added in v0.1.5

func WithAWSSTTCredentials(creds AWSCredentials) STTOption

func WithAWSSTTEnableChannelIdentification added in v0.0.15

func WithAWSSTTEnableChannelIdentification(enable bool) STTOption

func WithAWSSTTEnablePartialResultsStabilization added in v0.0.15

func WithAWSSTTEnablePartialResultsStabilization(enable bool) STTOption

func WithAWSSTTIdentifyLanguage added in v0.0.15

func WithAWSSTTIdentifyLanguage(identify bool) STTOption

func WithAWSSTTIdentifyMultipleLanguages added in v0.0.15

func WithAWSSTTIdentifyMultipleLanguages(identify bool) STTOption

func WithAWSSTTLanguage added in v0.1.5

func WithAWSSTTLanguage(language types.LanguageCode) STTOption

func WithAWSSTTLanguageModelName added in v0.0.15

func WithAWSSTTLanguageModelName(name string) STTOption

func WithAWSSTTLanguageOptions added in v0.0.15

func WithAWSSTTLanguageOptions(options string) STTOption

func WithAWSSTTNumberOfChannels added in v0.0.15

func WithAWSSTTNumberOfChannels(channels int32) STTOption

func WithAWSSTTPartialResultsStability added in v0.0.15

func WithAWSSTTPartialResultsStability(stability types.PartialResultsStability) STTOption

func WithAWSSTTPreferredLanguage added in v0.0.15

func WithAWSSTTPreferredLanguage(language types.LanguageCode) STTOption

func WithAWSSTTSampleRate added in v0.0.15

func WithAWSSTTSampleRate(sampleRate int32) STTOption

func WithAWSSTTSessionID added in v0.0.15

func WithAWSSTTSessionID(sessionID string) STTOption

func WithAWSSTTShowSpeakerLabel added in v0.0.15

func WithAWSSTTShowSpeakerLabel(show bool) STTOption

func WithAWSSTTVocabularyFilterMethod added in v0.0.15

func WithAWSSTTVocabularyFilterMethod(method types.VocabularyFilterMethod) STTOption

func WithAWSSTTVocabularyFilterName added in v0.0.15

func WithAWSSTTVocabularyFilterName(name string) STTOption

func WithAWSSTTVocabularyFilterNames added in v0.0.15

func WithAWSSTTVocabularyFilterNames(names string) STTOption

func WithAWSSTTVocabularyName added in v0.0.15

func WithAWSSTTVocabularyName(name string) STTOption

func WithAWSSTTVocabularyNames added in v0.0.15

func WithAWSSTTVocabularyNames(names string) STTOption

type TTS added in v0.4.2

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

func NewAWSTTS deprecated

func NewAWSTTS(ctx context.Context, region string, voice string, providerOpts ...TTSOption) (*TTS, error)

Deprecated: use NewTTS.

func NewTTS added in v0.4.2

func NewTTS(ctx context.Context, region string, voice string, providerOpts ...TTSOption) (*TTS, error)

func (*TTS) Capabilities added in v0.4.2

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

func (*TTS) Close added in v0.4.2

func (t *TTS) Close() error

func (*TTS) Label added in v0.4.2

func (t *TTS) Label() string

func (*TTS) Model added in v0.4.2

func (t *TTS) Model() string

func (*TTS) NumChannels added in v0.4.2

func (t *TTS) NumChannels() int

func (*TTS) Provider added in v0.4.2

func (t *TTS) Provider() string

func (*TTS) SampleRate added in v0.4.2

func (t *TTS) SampleRate() int

func (*TTS) Stream added in v0.4.2

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

func (*TTS) Synthesize added in v0.4.2

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

func (*TTS) UpdateOptions added in v0.4.2

func (t *TTS) UpdateOptions(opts ...TTSOption)

type TTSOption added in v0.4.2

type TTSOption func(*TTS)

func WithAWSTTSCredentials added in v0.1.5

func WithAWSTTSCredentials(creds AWSCredentials) TTSOption

func WithAWSTTSEngine added in v0.0.15

func WithAWSTTSEngine(engine types.Engine) TTSOption

func WithAWSTTSLanguage added in v0.0.15

func WithAWSTTSLanguage(language types.LanguageCode) TTSOption

func WithAWSTTSSampleRate added in v0.0.15

func WithAWSTTSSampleRate(sampleRate int) TTSOption

func WithAWSTTSTextType added in v0.0.15

func WithAWSTTSTextType(textType types.TextType) TTSOption

func WithAWSTTSVoice added in v0.0.15

func WithAWSTTSVoice(voice types.VoiceId) TTSOption

Jump to

Keyboard shortcuts

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