cyberosa commited on
Commit
eb433bb
·
1 Parent(s): 37b196d

fixing missing answer in the prompt

Browse files
Files changed (2) hide show
  1. agent.json +1 -2
  2. app.py +2 -0
agent.json CHANGED
@@ -28,8 +28,7 @@
28
  "managed_agent": {
29
  "task": "You're a helpful agent named '{{name}}'.\nYou have been submitted this task by your manager.\n---\nTask:\n{{task}}\n---\nYou're helping your manager solve a wider task: so make sure to not provide a one-line answer, but give as much information as possible to give them a clear understanding of the answer.\n\nYour final_answer WILL HAVE to contain these parts:\n### 1. Task outcome (short version):\n### 2. Task outcome (extremely detailed version):\n### 3. Additional context (if relevant):\n\nPut all these in your final_answer tool, everything that you do not pass as an argument to final_answer will be lost.\nAnd even if your task resolution is not successful, please return as much context as possible, so that your manager can act upon this feedback.",
30
  "report": "Here is the final answer from your managed agent '{{name}}':\n{{final_answer}}"
31
- },
32
- "final_answer": "Final Answer: {{final_answer}}"
33
  },
34
  "max_steps": 6,
35
  "verbosity_level": 1,
 
28
  "managed_agent": {
29
  "task": "You're a helpful agent named '{{name}}'.\nYou have been submitted this task by your manager.\n---\nTask:\n{{task}}\n---\nYou're helping your manager solve a wider task: so make sure to not provide a one-line answer, but give as much information as possible to give them a clear understanding of the answer.\n\nYour final_answer WILL HAVE to contain these parts:\n### 1. Task outcome (short version):\n### 2. Task outcome (extremely detailed version):\n### 3. Additional context (if relevant):\n\nPut all these in your final_answer tool, everything that you do not pass as an argument to final_answer will be lost.\nAnd even if your task resolution is not successful, please return as much context as possible, so that your manager can act upon this feedback.",
30
  "report": "Here is the final answer from your managed agent '{{name}}':\n{{final_answer}}"
31
+ }
 
32
  },
33
  "max_steps": 6,
34
  "verbosity_level": 1,
app.py CHANGED
@@ -45,6 +45,8 @@ image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_co
45
  with open("prompts.yaml", "r") as stream:
46
  prompt_templates = yaml.safe_load(stream)
47
 
 
 
48
  agent = CodeAgent(
49
  model=model,
50
  tools=[
 
45
  with open("prompts.yaml", "r") as stream:
46
  prompt_templates = yaml.safe_load(stream)
47
 
48
+ prompt_templates["final_answer"] = "{{answer}}"
49
+
50
  agent = CodeAgent(
51
  model=model,
52
  tools=[