Skip to content

Commit

Permalink
Update prompt to add mention of persistent state
Browse files Browse the repository at this point in the history
  • Loading branch information
aymeric-roucher committed Jul 9, 2024
1 parent 9285705 commit cbba80d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/transformers/agents/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion src/transformers/agents/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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: <<authorized_imports>>
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.
"""
Expand Down

0 comments on commit cbba80d

Please sign in to comment.