Add Support for Customizing default_headers in Azure OpenAI (#1925)

This commit is contained in:
Jian Yu, Chen
2024-10-19 18:27:28 +08:00
committed by GitHub
parent f058cda152
commit ff7761aaf8
8 changed files with 69 additions and 34 deletions

View File

@@ -63,6 +63,7 @@ class AzureConfig(BaseModel):
azure_deployment (str): The name of the Azure deployment.
azure_endpoint (str): The endpoint URL for the Azure service.
api_version (str): The version of the Azure API being used.
default_headers (Dict[str, str]): Headers to include in requests to the Azure API.
"""
api_key: str = Field(
@@ -72,3 +73,4 @@ class AzureConfig(BaseModel):
azure_deployment: str = Field(description="The name of the Azure deployment.", default=None)
azure_endpoint: str = Field(description="The endpoint URL for the Azure service.", default=None)
api_version: str = Field(description="The version of the Azure API being used.", default=None)
default_headers: Optional[Dict[str, str]] = Field(description="Headers to include in requests to the Azure API.", default=None)