Tahasaif3 commited on
Commit
456d4ee
·
verified ·
1 Parent(s): bcbcd56

Update app/api/routes/chat.py

Browse files
Files changed (1) hide show
  1. 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