rag-homework / backend /chunk_data.py
Vadim Zhamkov
Initial commit
b24327e
raw
history blame
243 Bytes
from langchain.text_splitter import RecursiveCharacterTextSplitter
text = "..."
text_splitter = RecursiveCharacterTextSplitter(
chunk_size = 320,
chunk_overlap = 64,
separators=['\n\n']
)
docs = text_splitter.create_documents([text])