Documentation
¶
Overview ¶
Package chatopenaiazure reaches Azure OpenAI deployments through the gitlab.com/phpboyscout/go/chat interface.
Azure serves OpenAI's models, so this module implements no protocol. It delegates to gitlab.com/phpboyscout/go/chat-openai and supplies the three things Azure addresses differently: the deployment name in the request path, an api-version on every request, and an api-key header or an Entra ID token instead of a bearer token.
It is a separate module rather than a construction path inside chat-openai because the Azure SDK's azcore is 33 packages, and folding it in would put them in the dependency graph of every consumer talking to OpenAI, whether or not they ever address a deployment. See https://gitlab.com/phpboyscout/go/chat/-/wikis/specs/0019-azure-openai-backend D2.
Activate it with a blank import, as with every provider in this family:
import _ "gitlab.com/phpboyscout/go/chat-openai-azure"
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*options)
Option configures an Azure client at construction.
func WithTokenCredential ¶
func WithTokenCredential(cred azcore.TokenCredential) Option
WithTokenCredential authenticates with Entra ID rather than an api-key.
It takes the credential rather than resolving one, so this module depends on azcore's interface and not on azidentity's implementations, which are a further 48 packages. A caller wanting ambient discovery passes azureclient.Ambient()'s credential in, which is one line where they already compose their dependencies. See spec 0019 D7.