Skip to content

Commit

Permalink
fix mypy issue
Browse files Browse the repository at this point in the history
  • Loading branch information
AnushreeBannadabhavi committed Mar 31, 2024
1 parent 695de8e commit a4e1d55
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions haystack/components/rankers/cohere.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ def run(self, query: str, documents: List[Document], top_k: Optional[int] = None
cohere_input_docs = self._prepare_cohere_input_docs(documents)
if len(cohere_input_docs) > 1000:
logger.warning(
"The Cohere reranking endpoint only supports 1000 documents. "
"The number of documents has been truncated to 1000 from %s.",
len(cohere_input_docs),
f"The Cohere reranking endpoint only supports 1000 documents. The number of documents has been truncated to 1000 from {len(cohere_input_docs)}."
)
cohere_input_docs = cohere_input_docs[:1000]

Expand Down

0 comments on commit a4e1d55

Please sign in to comment.