Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
id | str | "not-provided" | The id of the Azure OpenAI model to use. Set this to your model or deployment name |
name | str | "AzureOpenAI" | The name of the model |
provider | str | "Azure" | The provider of the model |
api_key | Optional[str] | None | The API key for Azure OpenAI (defaults to AZURE_OPENAI_API_KEY env var) |
api_version | Optional[str] | "2024-10-21" | The Azure OpenAI API version to use |
azure_endpoint | Optional[str] | None | The Azure endpoint, e.g. https://example.openai.azure.com (defaults to AZURE_OPENAI_ENDPOINT env var) |
azure_deployment | Optional[str] | None | The Azure deployment name (defaults to AZURE_OPENAI_DEPLOYMENT env var) |
base_url | Optional[str] | None | Full base URL for the API, used in place of azure_endpoint plus azure_deployment |
azure_ad_token | Optional[str] | None | Azure Active Directory token for authentication, used instead of an API key |
azure_ad_token_provider | Optional[Any] | None | Callable that returns an Azure AD token, refreshed on each request |
AzureOpenAI extends OpenAILike and accepts all of its parameters.