Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
|
@@ -524,6 +524,7 @@ def followup_agent(query: FollowupQueryModel, background_tasks: BackgroundTasks,
|
|
| 524 |
|
| 525 |
def process_response():
|
| 526 |
full_response = ""
|
|
|
|
| 527 |
|
| 528 |
# Check if tool_call is specified and call the tool directly
|
| 529 |
if query.tool_call in ["web", "news"]:
|
|
@@ -567,7 +568,7 @@ def followup_agent(query: FollowupQueryModel, background_tasks: BackgroundTasks,
|
|
| 567 |
# Add the assistant's response to the conversation history
|
| 568 |
conversations[query.conversation_id].append({"role": "assistant", "content": full_response})
|
| 569 |
background_tasks.add_task(update_db, query.user_id, query.conversation_id, query.query, full_response)
|
| 570 |
-
logger.info(f"Completed followup agent response for query: {query.query}, send result:
|
| 571 |
|
| 572 |
return StreamingResponse(process_response(), media_type="text/event-stream")
|
| 573 |
|
|
|
|
| 524 |
|
| 525 |
def process_response():
|
| 526 |
full_response = ""
|
| 527 |
+
result = dict()
|
| 528 |
|
| 529 |
# Check if tool_call is specified and call the tool directly
|
| 530 |
if query.tool_call in ["web", "news"]:
|
|
|
|
| 568 |
# Add the assistant's response to the conversation history
|
| 569 |
conversations[query.conversation_id].append({"role": "assistant", "content": full_response})
|
| 570 |
background_tasks.add_task(update_db, query.user_id, query.conversation_id, query.query, full_response)
|
| 571 |
+
logger.info(f"Completed followup agent response for query: {query.query}, send result:{result}, Full response: {full_response}")
|
| 572 |
|
| 573 |
return StreamingResponse(process_response(), media_type="text/event-stream")
|
| 574 |
|