Update app/api/routes/chat.py
Browse files- app/api/routes/chat.py +2 -2
app/api/routes/chat.py
CHANGED
|
@@ -39,8 +39,8 @@ async def process_chat_query(query_data: ChatQuery):
|
|
| 39 |
Process a chat query using the RAG pipeline
|
| 40 |
"""
|
| 41 |
try:
|
| 42 |
-
# Generate response using the RAG pipeline
|
| 43 |
-
result = rag_pipeline.generate_response(
|
| 44 |
query=query_data.query,
|
| 45 |
context=None, # In a real implementation, you would retrieve context from the database
|
| 46 |
selected_text=query_data.context # Using the context field for selected text
|
|
|
|
| 39 |
Process a chat query using the RAG pipeline
|
| 40 |
"""
|
| 41 |
try:
|
| 42 |
+
# Generate response using the RAG pipeline (NOW WITH AWAIT!)
|
| 43 |
+
result = await rag_pipeline.generate_response(
|
| 44 |
query=query_data.query,
|
| 45 |
context=None, # In a real implementation, you would retrieve context from the database
|
| 46 |
selected_text=query_data.context # Using the context field for selected text
|