From 7e4e150876991fe4f5fd9926327d638a36dbf999 Mon Sep 17 00:00:00 2001 From: Adam Kalman <3665017+ak11234@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:42:43 -0500 Subject: [PATCH] Fix azure_openai.py Azure OpenAI api key (when not using active directory authentication) was not being passed to the underlying openai object. --- pandasai/llm/azure_openai.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandasai/llm/azure_openai.py b/pandasai/llm/azure_openai.py index 13216ea89..25a0b4c78 100644 --- a/pandasai/llm/azure_openai.py +++ b/pandasai/llm/azure_openai.py @@ -176,6 +176,7 @@ def _client_params(self) -> Dict[str, any]: "azure_deployment": self.deployment_name, "azure_ad_token": self.azure_ad_token, "azure_ad_token_provider": self.azure_ad_token_provider, + "api_key": self.api_token, } return {**client_params, **super()._client_params}