Skip to content

Commit

Permalink
use RecursiveCharacterTextSplitter to correctly split docs into chunk…
Browse files Browse the repository at this point in the history
…s of specified size
  • Loading branch information
abhikvarma committed Feb 21, 2024
1 parent 598aa52 commit bc75bdb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions notebooks/en/rag_zephyr_langchain.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@
},
"outputs": [],
"source": [
"from langchain.text_splitter import CharacterTextSplitter\n",
"from langchain.text_splitter import RecursiveCharacterTextSplitter\n",
"\n",
"splitter = CharacterTextSplitter(chunk_size=512, chunk_overlap=30)\n",
"splitter = RecursiveCharacterTextSplitter(chunk_size=512, chunk_overlap=30)\n",
"\n",
"chunked_docs = splitter.split_documents(docs)"
]
Expand Down

0 comments on commit bc75bdb

Please sign in to comment.