diff --git a/embeddings_data_models.py b/embeddings_data_models.py index 40e2ad2..41d38d2 100644 --- a/embeddings_data_models.py +++ b/embeddings_data_models.py @@ -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() @@ -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()