Joshua Sundance Bailey
commited on
Commit
·
5ee47ca
1
Parent(s):
500ff1a
CharacterTextSplitter -> RecursiveCharacterTextSplitter
Browse files
langchain-streamlit-demo/app.py
CHANGED
@@ -18,7 +18,7 @@ from langchain.embeddings import OpenAIEmbeddings
|
|
18 |
from langchain.memory import ConversationBufferMemory, StreamlitChatMessageHistory
|
19 |
from langchain.prompts import ChatPromptTemplate, MessagesPlaceholder
|
20 |
from langchain.schema.retriever import BaseRetriever
|
21 |
-
from langchain.text_splitter import
|
22 |
from langchain.vectorstores import FAISS
|
23 |
from langsmith.client import Client
|
24 |
from streamlit_feedback import streamlit_feedback
|
@@ -127,7 +127,7 @@ def get_retriever(
|
|
127 |
|
128 |
loader = PyPDFLoader(temp_file.name)
|
129 |
documents = loader.load()
|
130 |
-
text_splitter =
|
131 |
chunk_size=chunk_size,
|
132 |
chunk_overlap=chunk_overlap,
|
133 |
)
|
|
|
18 |
from langchain.memory import ConversationBufferMemory, StreamlitChatMessageHistory
|
19 |
from langchain.prompts import ChatPromptTemplate, MessagesPlaceholder
|
20 |
from langchain.schema.retriever import BaseRetriever
|
21 |
+
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
22 |
from langchain.vectorstores import FAISS
|
23 |
from langsmith.client import Client
|
24 |
from streamlit_feedback import streamlit_feedback
|
|
|
127 |
|
128 |
loader = PyPDFLoader(temp_file.name)
|
129 |
documents = loader.load()
|
130 |
+
text_splitter = RecursiveCharacterTextSplitter(
|
131 |
chunk_size=chunk_size,
|
132 |
chunk_overlap=chunk_overlap,
|
133 |
)
|