Update agents/qa_agent.py
Browse files- agents/qa_agent.py +2 -6
agents/qa_agent.py
CHANGED
|
@@ -34,14 +34,10 @@ class QAAgent:
|
|
| 34 |
self.search_agent_response = ""
|
| 35 |
|
| 36 |
def solve(self, query):
|
| 37 |
-
|
| 38 |
-
if not os.path.exists("vector_db"):
|
| 39 |
-
st.warning("No papers loaded. Performing search first...")
|
| 40 |
-
search_agent = SearchAgent()
|
| 41 |
-
self.search_agent_response , self.papers = search_agent.solve(query)
|
| 42 |
|
| 43 |
# Load vector store
|
| 44 |
-
vector_db = FAISS.load_local("
|
| 45 |
|
| 46 |
# Get chat history
|
| 47 |
chat_history = st.session_state.get("chat_history", [])
|
|
|
|
| 34 |
self.search_agent_response = ""
|
| 35 |
|
| 36 |
def solve(self, query):
|
| 37 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
# Load vector store
|
| 40 |
+
vector_db = FAISS.load_local("vector_db", embeddings, index_name="base_and_adjacent", allow_dangerous_deserialization=True)
|
| 41 |
|
| 42 |
# Get chat history
|
| 43 |
chat_history = st.session_state.get("chat_history", [])
|