From 1399d8cf21dabb6dfe39550dc8ea963e001abe97 Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman Date: Sun, 16 Nov 2025 21:42:27 -0500 Subject: [PATCH] Fixed scientific paper so it can get to throught he discovery stage now --- examples/scientific_paper_writer.yaml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/examples/scientific_paper_writer.yaml b/examples/scientific_paper_writer.yaml index 1bfe7726..915e6b87 100644 --- a/examples/scientific_paper_writer.yaml +++ b/examples/scientific_paper_writer.yaml @@ -282,14 +282,8 @@ agents: msg = msg.replace('GOTO_DISCOVERY:', '', 1).strip() print(f"DEBUG discovery_controller: extracted msg='{msg}'", file=sys.stderr) - # Check if this is a pass-through message from an ask agent (no SET_ prefix and not from user) - # These should be shown directly to the user with DISCOVERY_RESPONSE prefix - if not msg.startswith('SET_') and not msg.startswith('GOTO_') and not msg.startswith('ROUTE_') and '?' in msg: - # This is a question from an ask agent, show it to the user without routing again - result = f"DISCOVERY_RESPONSE:{msg}" - print(f"DEBUG discovery_controller: detected question, returning: {result}", file=sys.stderr) # Process SET_ responses from ask agents - elif 'SET_TOPIC:' in msg: + if 'SET_TOPIC:' in msg: topic = msg.replace('SET_TOPIC:', '').strip() context['paper_details']['topic'] = topic result = f"DISCOVERY_RESPONSE:Thank you, topic has been set to \"{topic}\"\n\nCan you please specify the length, you would like to target for this paper." @@ -338,6 +332,8 @@ agents: config: provider: openai model: gpt-3.5-turbo + memory_enabled: true + max_history: 10 system_prompt: | You are an assistant helping to define a scientific paper. If the user has not yet provided a topic, ask them "What topic would you like to write about?" If the user's answer isn't clear, ask clarifying questions until @@ -350,6 +346,8 @@ agents: config: provider: openai model: gpt-3.5-turbo + memory_enabled: true + max_history: 10 system_prompt: | The topic has just been set. If the user has not yet provided information about the desired length, ask them "What length would you like for this paper? You can specify in pages, paragraphs, or word count." If the user @@ -364,6 +362,8 @@ agents: config: provider: openai model: gpt-3.5-turbo + memory_enabled: true + max_history: 10 system_prompt: | The length has just been set. If the user has not yet provided information about the target audience, ask them "Who is the target audience for this paper? (e.g., general public, experts, academics, etc.)" If the user @@ -376,6 +376,8 @@ agents: config: provider: openai model: gpt-3.5-turbo + memory_enabled: true + max_history: 10 system_prompt: | The audience has just been set. If the user has not yet provided information about publication plans, ask them "Do you plan to submit this paper to a specific publication or journal?" If the user doesnt give an answer @@ -390,6 +392,8 @@ agents: config: provider: openai model: gpt-3.5-turbo + memory_enabled: true + max_history: 10 system_prompt: | The intended publication has just been set. If the user has not yet provided information about the desired format, ask them "What format would you like for this paper? (Note: Currently only 'latex' is supported.)" @@ -407,6 +411,8 @@ agents: config: provider: openai model: gpt-3.5-turbo + memory_enabled: true + max_history: 10 system_prompt: | If the user has not yet been asked about other requirements, ask them "Are there any other requirements or specifications that should be considered for this paper?" If the user doesnt give an answer sufficiently