Skip to content

Commit

Permalink
add score_threshold to init for AzureOpenAIEncoder (newly required to…
Browse files Browse the repository at this point in the history
… extend BaseEncoder)
  • Loading branch information
James McKeown committed Jan 9, 2024
1 parent 2261271 commit d06d95e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion semantic_router/encoders/zure.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ def __init__(
azure_endpoint: str | None = None,
api_version: str | None = None,
model: str | None = None,
score_threshold: float = 0.82,
):
name = deployment_name
if name is None:
name = os.getenv("AZURE_OPENAI_DEPLOYMENT_NAME", "text-embedding-ada-002")
super().__init__(name=name)
super().__init__(name=name, score_threshold=score_threshold)
self.api_key = api_key
self.deployment_name = deployment_name
self.azure_endpoint = azure_endpoint
Expand Down

0 comments on commit d06d95e

Please sign in to comment.