yera.cli.setup_handlers.azure
Azure OpenAI provider setup handler.
Symbols
AzureSetup
BaseProviderSetupHandler for configuring Azure OpenAI provider connections.
This class provides mechanisms to automatically discover Azure OpenAI resources across all accessible subscriptions or to manually configure a specific connection via user input.
Methods
AzureSetup.detect_config
detect_config() → AzureConnection | NoneDiscover and select an Azure OpenAI account.
Returns
The selected Azure OpenAI connection, or None when discovery cannot produce an account.
AzureSetup.ask_for_config
ask_for_config() → AzureConnection | NoneInteractively prompts the user for Azure OpenAI connection details.
Collects required metadata including the endpoint, resource name, subscription ID, tenant ID, and resource group.
Returns
An AzureConnection instance containing the user-provided details, or None if the user declines the setup.
AzureSetup.validate
validate(
config: AzureConnection,
) → NoneValidate an Azure connection through the reusable setup operation.
Parameters
Azure OpenAI connection to validate.
Raises
If a Cognitive Services token cannot be acquired.