From bd8dc7934d60ae68a89902797ead4691a0910419 Mon Sep 17 00:00:00 2001 From: Utkarsh-Patel-13 Date: Sun, 27 Jul 2025 14:14:15 -0700 Subject: [PATCH] Fix for podcast assitantt content --- surfsense_backend/app/tasks/podcast_tasks.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/surfsense_backend/app/tasks/podcast_tasks.py b/surfsense_backend/app/tasks/podcast_tasks.py index 6bc3510d9..312ae5bc3 100644 --- a/surfsense_backend/app/tasks/podcast_tasks.py +++ b/surfsense_backend/app/tasks/podcast_tasks.py @@ -76,18 +76,10 @@ async def generate_chat_podcast( chat_history_str += f"{message['content']}" processed_messages += 1 elif message["role"] == "assistant": - # Last annotation type will always be "ANSWER" here - answer_annotation = message["annotations"][-1] - answer_text = "" - if answer_annotation["type"] == "ANSWER": - answer_text = answer_annotation["content"] - # If content is a list, join it into a single string - if isinstance(answer_text, list): - answer_text = "\n".join(answer_text) - chat_history_str += ( - f"{answer_text}" - ) - processed_messages += 1 + chat_history_str += ( + f"{message['content']}" + ) + processed_messages += 1 chat_history_str += ""