Problem:
The current Azure OpenAI configuration requires setting multiple parameters such as ProviderType, DeploymentId, ResourceName, and optional API version fields within the general OpenAI configuration. While functional, this approach can feel fragmented and less intuitive for enterprise scenarios where Azure OpenAI is used extensively.
Proposed Solution:
Introduce a more structured and dedicated configuration model for Azure OpenAI usage to improve clarity, usability, and validation.
Suggested Approach:
Introduce a dedicated AzureOpenAIOptions configuration model
Encapsulate Azure-specific fields such as:
Endpoint / Resource Name
Deployment Name
API Version
Provide validation for required fields
Optionally support cleaner initialization patterns for Azure-specific use cases
Example:
var client = new OpenAIService(new OpenAiOptions
{
Azure = new AzureOpenAIOptions
{
Endpoint = "...",
DeploymentName = "...",
ApiVersion = "2024-02-15-preview"
}
});
Benefits:
Improved developer experience for Azure OpenAI users
Clear separation between OpenAI and Azure OpenAI configurations
Better alignment with enterprise usage patterns
Reduced configuration errors through validation
I’d be happy to contribute an implementation if this aligns with the maintainers’ direction.
Problem:
The current Azure OpenAI configuration requires setting multiple parameters such as ProviderType, DeploymentId, ResourceName, and optional API version fields within the general OpenAI configuration. While functional, this approach can feel fragmented and less intuitive for enterprise scenarios where Azure OpenAI is used extensively.
Proposed Solution:
Introduce a more structured and dedicated configuration model for Azure OpenAI usage to improve clarity, usability, and validation.
Suggested Approach:
Introduce a dedicated AzureOpenAIOptions configuration model
Encapsulate Azure-specific fields such as:
Endpoint / Resource Name
Deployment Name
API Version
Provide validation for required fields
Optionally support cleaner initialization patterns for Azure-specific use cases
Example:
Benefits:
Improved developer experience for Azure OpenAI users
Clear separation between OpenAI and Azure OpenAI configurations
Better alignment with enterprise usage patterns
Reduced configuration errors through validation
I’d be happy to contribute an implementation if this aligns with the maintainers’ direction.