Skip to content

Commit

Permalink
Merge pull request #189 from szelesaron/fixes-AzureOpenAIEncoder
Browse files Browse the repository at this point in the history
fix: fixes #188 ```AzureOpenAIEncoder``` issue
  • Loading branch information
jamescalam committed Mar 8, 2024
2 parents cbae899 + 31d78a9 commit 0cd4c37
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions semantic_router/encoders/zure.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@ def __init__(

try:
self.client = openai.AzureOpenAI(
azure_deployment=str(deployment_name) if deployment_name else None,
api_key=str(api_key),
azure_endpoint=str(azure_endpoint),
api_version=str(api_version),
azure_deployment=str(self.deployment_name)
if self.deployment_name
else None,
api_key=str(self.api_key),
azure_endpoint=str(self.azure_endpoint),
api_version=str(self.api_version),
# _strict_response_validation=True,
)
except Exception as e:
Expand Down

0 comments on commit 0cd4c37

Please sign in to comment.