File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1771,7 +1771,7 @@ def _prepare_credentials(self) -> CredentialsOpenAi:
1771
1771
), "Error while trying to run AzureOpenAIInferenceEngine: Missing environment variable param AZURE_OPENAI_HOST or OPENAI_API_VERSION"
1772
1772
api_url = f"{ azure_openapi_host } /openai/deployments/{ self .model_name } /chat/completions?api-version={ api_version } "
1773
1773
1774
- return {"api_key" : api_key , "api_url" : api_url }
1774
+ return {"api_key" : api_key , "api_url" : api_url , "api_version" : api_version }
1775
1775
1776
1776
def create_client (self ):
1777
1777
from openai import AzureOpenAI
@@ -1780,6 +1780,7 @@ def create_client(self):
1780
1780
return AzureOpenAI (
1781
1781
api_key = self .credentials ["api_key" ],
1782
1782
base_url = self .credentials ["api_url" ],
1783
+ api_version = self .credentials ["api_version" ],
1783
1784
default_headers = self .get_default_headers (),
1784
1785
)
1785
1786
You can’t perform that action at this time.
0 commit comments