@@ -39,7 +39,8 @@ class EmbedResponse(BaseModel):
3939 """Response model for embedding generation."""
4040
4141 model_config = ConfigDict (
42- json_encoders = {datetime : lambda v : v .isoformat ()}, protected_namespaces = () # Allow model_ fields
42+ json_encoders = {datetime : lambda v : v .isoformat ()},
43+ protected_namespaces = (), # Allow model_ fields
4344 )
4445
4546 # Enhanced structure with both new format and backward compatibility
@@ -74,9 +75,7 @@ class RerankResult(BaseModel):
7475 )
7576 score : float = Field (
7677 ...,
77- description = "Relevance score (higher is more relevant, can be negative for similarity methods)" ,
78- ge = - 1.0 ,
79- le = 1.0 ,
78+ description = "Relevance score (higher is more relevant, raw logits from model or normalized based on client request)" ,
8079 json_schema_extra = {"example" : 0.8542 },
8180 )
8281 index : int = Field (..., description = "Original index in input list" , ge = 0 , json_schema_extra = {"example" : 0 })
@@ -86,7 +85,8 @@ class RerankResponse(BaseModel):
8685 """Response model for document reranking."""
8786
8887 model_config = ConfigDict (
89- json_encoders = {datetime : lambda v : v .isoformat ()}, protected_namespaces = () # Allow model_ fields
88+ json_encoders = {datetime : lambda v : v .isoformat ()},
89+ protected_namespaces = (), # Allow model_ fields
9090 )
9191
9292 results : List [RerankResult ] = Field (
0 commit comments