From b61de9728eb17bc904dd215b047628d4ec6b52b3 Mon Sep 17 00:00:00 2001 From: Philippe PRADOS Date: Fri, 14 Jun 2024 19:55:18 +0200 Subject: [PATCH] community[minor]: Fix long_context_reorder.py async (#22839) Implement `async def atransform_documents( self, documents: Sequence[Document], **kwargs: Any ) -> Sequence[Document]` for `LongContextReorder` --- .../document_transformers/long_context_reorder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/community/langchain_community/document_transformers/long_context_reorder.py b/libs/community/langchain_community/document_transformers/long_context_reorder.py index a047c2d143..b4808c7a7c 100644 --- a/libs/community/langchain_community/document_transformers/long_context_reorder.py +++ b/libs/community/langchain_community/document_transformers/long_context_reorder.py @@ -42,4 +42,4 @@ class LongContextReorder(BaseDocumentTransformer, BaseModel): async def atransform_documents( self, documents: Sequence[Document], **kwargs: Any ) -> Sequence[Document]: - raise NotImplementedError + return _litm_reordering(list(documents))