Skip to content

Commit

Permalink
Merge pull request #4 from aurelio-labs/francesco/fix-rerank-parameters
Browse files Browse the repository at this point in the history
fix: optional truncation parameter
  • Loading branch information
frapaoli authored Dec 8, 2024
2 parents e25de98 + 2d58187 commit 2690ff5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pinecone_async/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ async def rerank(
documents=[Document(**doc) for doc in documents],
top_n=top_n,
return_documents=return_documents,
parameters=RerankParameters(**(parameters or {})),
parameters=RerankParameters(**parameters) if parameters else None,
rank_fields=rank_fields
)

Expand All @@ -158,4 +158,3 @@ async def rerank(
def list_supported_models(cls) -> list[str]:
"""Returns a list of supported reranking models."""
return list(cls.RERANK_MODELS.keys())

0 comments on commit 2690ff5

Please sign in to comment.