pvanand commited on
Commit
0a18670
1 Parent(s): 7f3d0a2

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -590,8 +590,6 @@ def followup_agent(query: FollowupQueryModel, background_tasks: BackgroundTasks,
590
 
591
  yield "<json>" + json.dumps(result)
592
 
593
- # Add the assistant's response to the conversation history
594
- conversations[query.conversation_id].append({"role": "assistant", "content": full_response})
595
 
596
  # Process tool if present
597
  if tools and len(tools) > 0:
@@ -605,7 +603,9 @@ def followup_agent(query: FollowupQueryModel, background_tasks: BackgroundTasks,
605
  yield content
606
  full_response += content
607
  yield "</report>"
608
-
 
 
609
  background_tasks.add_task(update_db, query.user_id, query.conversation_id, query.query, full_response)
610
  logger.info(f"Completed followup agent response for query: {query.query}, send result: {result}")
611
 
 
590
 
591
  yield "<json>" + json.dumps(result)
592
 
 
 
593
 
594
  # Process tool if present
595
  if tools and len(tools) > 0:
 
603
  yield content
604
  full_response += content
605
  yield "</report>"
606
+
607
+ # Add the assistant's response to the conversation history
608
+ conversations[query.conversation_id].append({"role": "assistant", "content": full_response})
609
  background_tasks.add_task(update_db, query.user_id, query.conversation_id, query.query, full_response)
610
  logger.info(f"Completed followup agent response for query: {query.query}, send result: {result}")
611