Skip to content

AzureOpenAIConnectionHandler

Description: Automatically infers the values from environment variables for: - api_key from AZURE_OPENAI_API_KEY (IFF api_key AND ‘azure_ad_token_provider’ is not provided) - organization from OPENAI_ORG_ID - azure_ad_token from AZURE_OPENAI_AD_TOKEN - api_version from OPENAI_API_VERSION - azure_endpoint from AZURE_OPENAI_ENDPOINT

PropertyPatternTypeDeprecatedDefinitionTitle/Description
- implementationNoconstNo-AzureOpenAIConnectionHandler
- azure_ad_token_providerNoobjectNoIn #/$defs/ReferenceUsed to create references to other classes. t is designed to be used with two type variables, `B` and `D` which are
the type bound and default type respectively. Neither are required, and if only one type is provided it is assumed
to be the bound. Bound is used as the default if no default is provided. default can also be a string which will be
looked up from the OS ReferenceResources.

Examples:
Reference(implementation=fqn(Foo) # Returns an instance of Foo
ReferenceFooBase.instantiate() # Returns an instance of Foo
ReferenceFooBase # Raises ValueError
ReferenceFooBase, Foo.instantiate() # Returns an instance of Foo
ReferenceFooBase.instantiate() # Returns an instance of FooBase

Attributes:
_bound: This is a type variable `B` that represents the bound type of the reference. It defaults to `object`.
_default: This is a type variable `D` that represents the default type of the reference. It defaults to `None`.
implementation: This is a string that represents the fully qualified name of the class that the reference points to. It is optional and can be set to `None`.
**extra: This is a dictionary that can hold any additional specifications for the reference. It is optional and can be set to `None`.

Methods:
instantiate: This method is used to create an instance of the class that the reference points to.
- token_provider_scopesNoarray of stringNo-Token Provider Scopes
- api_versionNostringNo-Api Version
- NoobjectNo--

1. Property implementation

Typeconst
RequiredNo

Description: AzureOpenAIConnectionHandler

Specific value: "AzureOpenAIConnectionHandler"

2. Property azure_ad_token_provider

Typeobject
RequiredNo
Additional properties[Any type: allowed]
Defined in#/$defs/Reference

Description: Used to create references to other classes. t is designed to be used with two type variables, B and D which are the type bound and default type respectively. Neither are required, and if only one type is provided it is assumed to be the bound. Bound is used as the default if no default is provided. default can also be a string which will be looked up from the OS ReferenceResources.

Examples: Reference(implementation=fqn(Foo) # Returns an instance of Foo ReferenceFooBase.instantiate() # Returns an instance of Foo ReferenceFooBase # Raises ValueError ReferenceFooBase, Foo.instantiate() # Returns an instance of Foo ReferenceFooBase.instantiate() # Returns an instance of FooBase

Attributes: _bound: This is a type variable B that represents the bound type of the reference. It defaults to object. _default: This is a type variable D that represents the default type of the reference. It defaults to None. implementation: This is a string that represents the fully qualified name of the class that the reference points to. It is optional and can be set to None. **extra: This is a dictionary that can hold any additional specifications for the reference. It is optional and can be set to None.

Methods: instantiate: This method is used to create an instance of the class that the reference points to.

PropertyPatternTypeDeprecatedDefinitionTitle/Description
- implementationNostringNo-Implementation
- NoobjectNo--

2.1. Property implementation

Title: Implementation

Typestring
RequiredNo
Defaultnull

3. Property token_provider_scopes

Title: Token Provider Scopes

Typearray of string
RequiredNo
Default["https://cognitiveservices.azure.com/.default"]
Array restrictions
Min itemsN/A
Max itemsN/A
Items unicityFalse
Additional itemsFalse
Tuple validationSee below
Each item of this array must beDescription
token_provider_scopes items-

3.1. token_provider_scopes items

Typestring
RequiredNo

4. Property api_version

Title: Api Version

Typestring
RequiredNo
Default"2024-02-01"