Skip to content

Commit

Permalink
Fix optional parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
frapaoli committed Dec 8, 2024
1 parent e25de98 commit 2d58187
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 2d58187

Please sign in to comment.