Merge pull request #20 from joshuasundance-swca/dev
Browse files- langchain-streamlit-demo/app.py +2 -2
- requirements.txt +1 -1
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 |
)
|
requirements.txt
CHANGED
@@ -4,6 +4,6 @@ langchain==0.0.293
|
|
4 |
langsmith==0.0.38
|
5 |
openai==0.28.0
|
6 |
pypdf==3.16.1
|
7 |
-
streamlit==1.
|
8 |
streamlit-feedback==0.1.2
|
9 |
tiktoken==0.5.1
|
|
|
4 |
langsmith==0.0.38
|
5 |
openai==0.28.0
|
6 |
pypdf==3.16.1
|
7 |
+
streamlit==1.27.0
|
8 |
streamlit-feedback==0.1.2
|
9 |
tiktoken==0.5.1
|