cognee/cognee/tasks/documents/extract_chunks_from_documents.py
Boris 52180eb6b5
feat: COG-184 add falkordb (#192)
* feat: add falkordb adapter

---------

Co-authored-by: hajdul88 <52442977+hajdul88@users.noreply.github.com>
2024-11-11 18:20:52 +01:00

7 lines
304 B
Python

from cognee.modules.data.processing.document_types.Document import Document
async def extract_chunks_from_documents(documents: list[Document], chunk_size: int = 1024):
for document in documents:
for document_chunk in document.read(chunk_size = chunk_size):
yield document_chunk