Spaces:
Sleeping
Sleeping
Rohil Bansal
commited on
Commit
·
df844ea
1
Parent(s):
65e3bf6
changed recursion limit and search kw
Browse files- app.py +1 -1
- src/__pycache__/buildgraph.cpython-312.pyc +0 -0
- src/__pycache__/index.cpython-312.pyc +0 -0
- src/buildgraph.py +1 -1
- src/index.py +1 -1
app.py
CHANGED
@@ -48,7 +48,7 @@ if "messages" not in st.session_state:
|
|
48 |
if "thread_id" not in st.session_state:
|
49 |
st.session_state.thread_id = "streamlit_thread"
|
50 |
|
51 |
-
config = {"recursion_limit":
|
52 |
|
53 |
# Display chat messages from history on app rerun
|
54 |
for message in st.session_state.messages:
|
|
|
48 |
if "thread_id" not in st.session_state:
|
49 |
st.session_state.thread_id = "streamlit_thread"
|
50 |
|
51 |
+
config = {"recursion_limit": 8, "configurable": {"thread_id": st.session_state.thread_id}}
|
52 |
|
53 |
# Display chat messages from history on app rerun
|
54 |
for message in st.session_state.messages:
|
src/__pycache__/buildgraph.cpython-312.pyc
CHANGED
Binary files a/src/__pycache__/buildgraph.cpython-312.pyc and b/src/__pycache__/buildgraph.cpython-312.pyc differ
|
|
src/__pycache__/index.cpython-312.pyc
CHANGED
Binary files a/src/__pycache__/index.cpython-312.pyc and b/src/__pycache__/index.cpython-312.pyc differ
|
|
src/buildgraph.py
CHANGED
@@ -193,7 +193,7 @@ def run_workflow(user_input, config):
|
|
193 |
return {"generation": "I encountered an error while processing your question. Please try again."}
|
194 |
|
195 |
if __name__ == "__main__":
|
196 |
-
config = {"configurable": {"thread_id": "
|
197 |
while True:
|
198 |
question = input("Enter your question (or 'quit' to exit): ")
|
199 |
if question.lower() == 'quit':
|
|
|
193 |
return {"generation": "I encountered an error while processing your question. Please try again."}
|
194 |
|
195 |
if __name__ == "__main__":
|
196 |
+
config = {"configurable": {"thread_id": "1"}}
|
197 |
while True:
|
198 |
question = input("Enter your question (or 'quit' to exit): ")
|
199 |
if question.lower() == 'quit':
|
src/index.py
CHANGED
@@ -125,7 +125,7 @@ try:
|
|
125 |
|
126 |
print("Creating LangChain vectorstore...")
|
127 |
vectorstore = LangchainPinecone(pinecone_index, embd.embed_query, "text")
|
128 |
-
retriever = vectorstore.as_retriever(search_kwargs={"k":
|
129 |
print("Retriever set up successfully.")
|
130 |
except Exception as e:
|
131 |
print(f"Error with Pinecone operations: {e}")
|
|
|
125 |
|
126 |
print("Creating LangChain vectorstore...")
|
127 |
vectorstore = LangchainPinecone(pinecone_index, embd.embed_query, "text")
|
128 |
+
retriever = vectorstore.as_retriever(search_kwargs={"k": 3})
|
129 |
print("Retriever set up successfully.")
|
130 |
except Exception as e:
|
131 |
print(f"Error with Pinecone operations: {e}")
|