Documentation
¶
Overview ¶
Package azureopenai adapts Azure OpenAI's current OpenAI-compatible v1 API to the Core model interfaces.
BaseURL is the complete Azure OpenAI v1 base URL, for example "https://RESOURCE.openai.azure.com/openai/v1/". Model names are Azure deployment names. Authentication uses the API key through the standard OpenAI client authentication path accepted by Azure's v1 endpoint.
Only the current v1 endpoint shape is modeled; no dated api-version is required.
Output token limits go out as max_completion_tokens. Azure documents that reasoning models "will only work with the max_completion_tokens parameter when using the Chat Completions API", and lists max_tokens among the parameters those models do not support, so max_tokens was the one field a caller's MaxOutputTokens could not survive on a GPT-5 or o-series deployment.
Index ¶
Constants ¶
const ( OpenAIRequestExtensionKey = "azureopenai/openai_request" OpenAIResponseExtensionKey = "azureopenai/openai_response" OpenAIStreamChunkExtensionKey = "azureopenai/openai_stream_chunk" )
Namespacing preserves provider-specific data without promoting it into the shared Core protocol or colliding with another provider.
const (
Provider = "AzureOpenAI"
)
Provider is the stable backend name for host-side attribution.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioTTSModel ¶
type AudioTTSModel = openai.AudioTTSModel
AudioTTSModel is the shared protocol type itself rather than a wrapper, so this provider adds no second public surface for callers to choose between.
func NewAudioTTSModel ¶
func NewAudioTTSModel(ctx context.Context, config AudioTTSModelConfig) (*AudioTTSModel, error)
NewAudioTTSModel rejects an invalid provider binding before the first speech call.
type AudioTTSModelConfig ¶
AudioTTSModelConfig binds provider access and defaults shared by every speech call.
func (AudioTTSModelConfig) Validate ¶
func (a AudioTTSModelConfig) Validate() error
type AudioTranscriptionModel ¶
type AudioTranscriptionModel = openai.AudioTranscriptionModel
AudioTranscriptionModel is the shared protocol type itself rather than a wrapper, so this provider adds no second public surface for callers to choose between.
func NewAudioTranscriptionModel ¶
func NewAudioTranscriptionModel(ctx context.Context, config AudioTranscriptionModelConfig) (*AudioTranscriptionModel, error)
NewAudioTranscriptionModel rejects an invalid provider binding before the first transcription call.
type AudioTranscriptionModelConfig ¶
type AudioTranscriptionModelConfig struct {
Config
DefaultOptions transcription.Options
}
AudioTranscriptionModelConfig binds provider access and defaults shared by every transcription call.
func (AudioTranscriptionModelConfig) Validate ¶
func (a AudioTranscriptionModelConfig) Validate() error
type Chat ¶
type Chat = openai.ChatCompletions
Chat implements Azure OpenAI's Chat Completions protocol.
type ChatConfig ¶
ChatConfig binds provider access and defaults shared by every chat call.
func (ChatConfig) Validate ¶
func (c ChatConfig) Validate() error
type EmbeddingModel ¶
type EmbeddingModel = openai.EmbeddingModel
EmbeddingModel is the shared protocol type itself rather than a wrapper, so this provider adds no second public surface for callers to choose between.
func NewEmbeddingModel ¶
func NewEmbeddingModel(ctx context.Context, config EmbeddingModelConfig) (*EmbeddingModel, error)
NewEmbeddingModel rejects an invalid provider binding before the first embedding call.
type EmbeddingModelConfig ¶
EmbeddingModelConfig binds provider access and defaults shared by every embedding call.
func (EmbeddingModelConfig) Validate ¶
func (e EmbeddingModelConfig) Validate() error
type ImageModel ¶
type ImageModel = openai.ImageModel
ImageModel is the shared protocol type itself rather than a wrapper, so this provider adds no second public surface for callers to choose between.
func NewImageModel ¶
func NewImageModel(ctx context.Context, config ImageModelConfig) (*ImageModel, error)
NewImageModel rejects an invalid provider binding before the first image call.
type ImageModelConfig ¶
ImageModelConfig binds provider access and defaults shared by every image call.
func (ImageModelConfig) Validate ¶
func (i ImageModelConfig) Validate() error