mirror of
https://github.com/langchain-ai/docs.git
synced 2026-08-27 02:41:59 -04:00
12 lines
311 B
Plaintext
12 lines
311 B
Plaintext
```python
|
|
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
|
|
|
docs_list = [item for sublist in docs for item in sublist]
|
|
|
|
text_splitter = RecursiveCharacterTextSplitter.from_tiktoken_encoder(
|
|
chunk_size=100,
|
|
chunk_overlap=50,
|
|
)
|
|
doc_splits = text_splitter.split_documents(docs_list)
|
|
```
|