Skip to content

Commit

Permalink
Update embeddings_data_models.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Dicklesworthstone authored Sep 13, 2024
1 parent 4fab5e4 commit 54cd843
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions embeddings_data_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class SimilarityRequest(BaseModel):
similarity_measure: str = "all"
@field_validator('similarity_measure')
def validate_similarity_measure(cls, value):
valid_measures = ["all", "spearman_rho", "kendall_tau", "approximate_distance_correlation", "jensen_shannon_similarity", "hoeffding_d"]
valid_measures = ["all", "spearman_rho", "kendall_tau", "approximate_distance_correlation", "jensen_shannon_dependency_measure", "hoeffding_d"]
if value.lower() not in valid_measures:
raise ValueError(f"Invalid similarity measure. Supported measures are: {', '.join(valid_measures)}")
return value.lower()
Expand Down Expand Up @@ -126,7 +126,7 @@ class AdvancedSemanticSearchRequest(BaseModel):
result_sorting_metric: str = "hoeffding_d"
@field_validator('result_sorting_metric')
def validate_similarity_measure(cls, value):
valid_measures = ["spearman_rho", "kendall_tau", "approximate_distance_correlation", "jensen_shannon_similarity", "hoeffding_d"]
valid_measures = ["spearman_rho", "kendall_tau", "approximate_distance_correlation", "jensen_shannon_dependency_measure", "hoeffding_d"]
if value.lower() not in valid_measures:
raise ValueError(f"Invalid similarity measure. Supported measures are: {', '.join(valid_measures)}")
return value.lower()
Expand Down

0 comments on commit 54cd843

Please sign in to comment.