Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,6 +19,7 @@ import requests
|
|
19 |
import tempfile
|
20 |
from langchain.memory import ConversationBufferWindowMemory
|
21 |
import time
|
|
|
22 |
|
23 |
|
24 |
|
@@ -65,6 +66,9 @@ def generate_full_text_query(input: str) -> str:
|
|
65 |
full_text_query += f" {words[-1]}~2"
|
66 |
return full_text_query.strip()
|
67 |
|
|
|
|
|
|
|
68 |
def structured_retriever(question: str) -> str:
|
69 |
result = ""
|
70 |
entities = entity_chain.invoke({"question": question})
|
@@ -145,6 +149,7 @@ chain_neo4j = (
|
|
145 |
)
|
146 |
| qa_prompt
|
147 |
| chat_model
|
|
|
148 |
| StrOutputParser()
|
149 |
)
|
150 |
|
|
|
19 |
import tempfile
|
20 |
from langchain.memory import ConversationBufferWindowMemory
|
21 |
import time
|
22 |
+
import logging
|
23 |
|
24 |
|
25 |
|
|
|
66 |
full_text_query += f" {words[-1]}~2"
|
67 |
return full_text_query.strip()
|
68 |
|
69 |
+
# Setup logging to a file to capture debug information
|
70 |
+
logging.basicConfig(filename='neo4j_retrieval.log', level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
|
71 |
+
|
72 |
def structured_retriever(question: str) -> str:
|
73 |
result = ""
|
74 |
entities = entity_chain.invoke({"question": question})
|
|
|
149 |
)
|
150 |
| qa_prompt
|
151 |
| chat_model
|
152 |
+
| conversational_memory
|
153 |
| StrOutputParser()
|
154 |
)
|
155 |
|