Adding proxy server settings to azure openai (#1753)

This commit is contained in:
Pranav Puranik
2024-08-29 04:48:50 -05:00
committed by GitHub
parent deeb4f2250
commit fee3c27af3
7 changed files with 46 additions and 6 deletions

View File

@@ -15,10 +15,9 @@ class AzureOpenAILLM(LLMBase):
# Model name should match the custom deployment name chosen for it.
if not self.config.model:
self.config.model = "gpt-4o"
self.client = AzureOpenAI()
api_key = os.getenv("AZURE_OPENAI_API_KEY") or self.config.api_key
self.client = AzureOpenAI(api_key=api_key)
self.client = AzureOpenAI(api_key=api_key, http_client=self.config.http_client)
def _parse_response(self, response, tools):
"""