Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -135,6 +135,13 @@ async def ask(query: Query):
|
|
135 |
timeout_callback = TimeoutCallback(timeout_seconds=60)
|
136 |
|
137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
loop = asyncio.get_event_loop()
|
139 |
|
140 |
answer = await asyncio.wait_for(
|
|
|
135 |
timeout_callback = TimeoutCallback(timeout_seconds=60)
|
136 |
|
137 |
|
138 |
+
docs = retriever.get_relevant_documents(query.question)
|
139 |
+
if not docs:
|
140 |
+
logger.warning("No documents retrieved from Qdrant for the question.")
|
141 |
+
else:
|
142 |
+
logger.debug(f"Retrieved documents: {[doc.page_content for doc in docs[:1]]}")
|
143 |
+
|
144 |
+
|
145 |
loop = asyncio.get_event_loop()
|
146 |
|
147 |
answer = await asyncio.wait_for(
|