From cbba80db91261e8343cb69c65ed115d38d76619f Mon Sep 17 00:00:00 2001 From: Aymeric Date: Tue, 9 Jul 2024 19:47:51 +0200 Subject: [PATCH] Update prompt to add mention of persistent state --- src/transformers/agents/agents.py | 1 - src/transformers/agents/prompts.py | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transformers/agents/agents.py b/src/transformers/agents/agents.py index 8afec2ab7d2349..75b1481a8971c1 100644 --- a/src/transformers/agents/agents.py +++ b/src/transformers/agents/agents.py @@ -837,7 +837,6 @@ def planning_step(self, task, is_first_step=False, iteration: int = None): self.logs.append({"plan": final_plan_redaction, "facts": final_facts_redaction}) self.logger.debug("===== Updated plan: =====") self.logger.debug(final_plan_redaction) - print("UPDATED PLAN:", final_plan_redaction) class ReactJsonAgent(ReactAgent): diff --git a/src/transformers/agents/prompts.py b/src/transformers/agents/prompts.py index 161342df870e0e..4c3f9b56bcd7fb 100644 --- a/src/transformers/agents/prompts.py +++ b/src/transformers/agents/prompts.py @@ -365,7 +365,8 @@ def download_prompt(prompt_or_repo_id, agent_name, mode="run"): 6. Don't name any new variable with the same name as a tool: for instance don't name a variable 'final_answer'. 7. Never create any notional variables in our code, as having these in your logs might derail you from the true variables. 8. You can use imports in your code, but only from the following list of modules: <> -9. Don't give up! You're in charge of solving the task, not providing directions to solve it. +9. The state persists between code executions: so if in one step you've created variables or imported modules, these will all persist. +10. Don't give up! You're in charge of solving the task, not providing directions to solve it. Now Begin! If you solve the task correctly, you will receive a reward of $1,000,000. """