Spaces:
Runtime error
Runtime error
File size: 303 Bytes
9db894e |
1 2 3 4 5 6 7 |
from typing import List
def split_document(data: List, chunk_size: int = 3000) -> List:
from langchain.text_splitter import RecursiveCharacterTextSplitter
text_splitter = RecursiveCharacterTextSplitter(chunk_size=chunk_size, chunk_overlap=400)
docs = text_splitter.split_documents(data)
return docs |