From a4e1d55abf99b2fc9ea28f33f1d48ecf1268c764 Mon Sep 17 00:00:00 2001 From: Anushree Bannadabhavi Date: Sun, 31 Mar 2024 17:10:01 -0400 Subject: [PATCH] fix mypy issue --- haystack/components/rankers/cohere.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/haystack/components/rankers/cohere.py b/haystack/components/rankers/cohere.py index 9c01e3c13d..0e93c10728 100644 --- a/haystack/components/rankers/cohere.py +++ b/haystack/components/rankers/cohere.py @@ -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]