diff --git a/surfsense_backend/app/agents/podcaster/nodes.py b/surfsense_backend/app/agents/podcaster/nodes.py index 51d748a3e..bce9882d6 100644 --- a/surfsense_backend/app/agents/podcaster/nodes.py +++ b/surfsense_backend/app/agents/podcaster/nodes.py @@ -29,7 +29,6 @@ async def create_podcast_transcript( configuration = Configuration.from_runnable_config(config) user_id = configuration.user_id search_space_id = configuration.search_space_id - podcast_title = configuration.podcast_title # Get user's long context LLM llm = await get_user_long_context_llm(state.db_session, user_id, search_space_id) @@ -38,8 +37,8 @@ async def create_podcast_transcript( print(error_message) raise RuntimeError(error_message) - # Get the prompt with podcast_title as user_prompt - prompt = get_podcast_generation_prompt(user_prompt=podcast_title) + # Get the prompt + prompt = get_podcast_generation_prompt() # Create the messages messages = [ diff --git a/surfsense_backend/app/agents/podcaster/prompts.py b/surfsense_backend/app/agents/podcaster/prompts.py index 3e0981f32..a3d6c3147 100644 --- a/surfsense_backend/app/agents/podcaster/prompts.py +++ b/surfsense_backend/app/agents/podcaster/prompts.py @@ -1,19 +1,11 @@ import datetime -def get_podcast_generation_prompt(user_prompt: str | None = None): - user_prompt_section = "" - if user_prompt: - user_prompt_section = f""" - -{user_prompt} - -""" - +def get_podcast_generation_prompt(): return f""" Today's date: {datetime.datetime.now().strftime("%Y-%m-%d")} -You are a master podcast scriptwriter, adept at transforming diverse input content into a lively, engaging, and natural-sounding conversation between two distinct podcast hosts. Your primary objective is to craft authentic, flowing dialogue that captures the spontaneity and chemistry of a real podcast discussion, completely avoiding any hint of robotic scripting or stiff formality. Think dynamic interplay, not just information delivery.{user_prompt_section} +You are a master podcast scriptwriter, adept at transforming diverse input content into a lively, engaging, and natural-sounding conversation between two distinct podcast hosts. Your primary objective is to craft authentic, flowing dialogue that captures the spontaneity and chemistry of a real podcast discussion, completely avoiding any hint of robotic scripting or stiff formality. Think dynamic interplay, not just information delivery. - '': A block of text containing the information to be discussed in the podcast. This could be research findings, an article summary, a detailed outline, user chat history related to the topic, or any other relevant raw information. The content might be unstructured but serves as the factual basis for the podcast dialogue. diff --git a/surfsense_backend/app/tasks/celery_tasks/podcast_tasks.py b/surfsense_backend/app/tasks/celery_tasks/podcast_tasks.py index 1e938d829..59a3bb2b1 100644 --- a/surfsense_backend/app/tasks/celery_tasks/podcast_tasks.py +++ b/surfsense_backend/app/tasks/celery_tasks/podcast_tasks.py @@ -46,7 +46,7 @@ def generate_chat_podcast_task( Args: chat_id: ID of the chat to generate podcast from search_space_id: ID of the search space - podcast_title: Title for the podcast (used as user prompt for generation) + podcast_title: Title for the podcast user_id: ID of the user """ loop = asyncio.new_event_loop() diff --git a/surfsense_backend/app/tasks/podcast_tasks.py b/surfsense_backend/app/tasks/podcast_tasks.py index ea125fa11..51e750f4d 100644 --- a/surfsense_backend/app/tasks/podcast_tasks.py +++ b/surfsense_backend/app/tasks/podcast_tasks.py @@ -96,7 +96,7 @@ async def generate_chat_podcast( config = { "configurable": { - "podcast_title": podcast_title, + "podcast_title": "SurfSense", "user_id": str(user_id), "search_space_id": search_space_id, }