Skip to content

Commit

Permalink
allow enabling rerankers raw_scores (#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
rawsh authored Oct 2, 2024
1 parent bb39cbd commit 99d28e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions libs/infinity_emb/infinity_emb/fastapi_schemas/pymodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ class RerankInput(BaseModel):
**ITEMS_LIMIT,
)
return_documents: bool = False
raw_scores: bool = False
model: str = "default/not-specified"


Expand Down
2 changes: 1 addition & 1 deletion libs/infinity_emb/infinity_emb/infinity_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ async def _rerank(data: RerankInput):
start = time.perf_counter()

scores, usage = await engine.rerank(
query=data.query, docs=data.documents, raw_scores=False
query=data.query, docs=data.documents, raw_scores=data.raw_scores
)

duration = (time.perf_counter() - start) * 1000
Expand Down

0 comments on commit 99d28e2

Please sign in to comment.