azure

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureLLM added in v0.0.10

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

AzureLLM implements llm.LLM using the Azure OpenAI Service REST API. It leverages the go-openai client with an Azure-compatible configuration.

func NewAzureLLM added in v0.0.10

func NewAzureLLM(apiKey, endpoint, deployment, apiVersion string) *AzureLLM

NewAzureLLM creates an AzureLLM using the Azure OpenAI endpoint.

Parameters:

  • apiKey: Azure OpenAI API key (from Azure portal)
  • endpoint: Azure resource endpoint, e.g. "https://<resource>.openai.azure.com/"
  • deployment: Deployment name configured in Azure (e.g. "gpt-4o")
  • apiVersion: Azure OpenAI API version, e.g. "2024-02-01"

func (*AzureLLM) Chat added in v0.0.10

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

Chat sends a streaming chat completion request to Azure OpenAI and returns an LLMStream.

func (*AzureLLM) Label added in v0.0.10

func (l *AzureLLM) Label() string

func (*AzureLLM) RawClient added in v0.0.10

func (l *AzureLLM) RawClient() *openai.Client

RawClient returns the underlying go-openai client for advanced usage.

type AzureSTT

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

func NewAzureSTT

func NewAzureSTT(apiKey string, region string, language string) *AzureSTT

func (*AzureSTT) Capabilities

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

func (*AzureSTT) Label

func (s *AzureSTT) Label() string

func (*AzureSTT) Recognize

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

func (*AzureSTT) Stream

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

type AzureTTS

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

func NewAzureTTS

func NewAzureTTS(apiKey string, region string, voice string, language string) *AzureTTS

func (*AzureTTS) Capabilities

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

func (*AzureTTS) Label

func (t *AzureTTS) Label() string

func (*AzureTTS) NumChannels

func (t *AzureTTS) NumChannels() int

func (*AzureTTS) SampleRate

func (t *AzureTTS) SampleRate() int

func (*AzureTTS) Stream

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

func (*AzureTTS) Synthesize

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

Jump to

Keyboard shortcuts

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