wizofavalon commited on
Commit
ee1ce4d
·
verified ·
1 Parent(s): 3cd7ccc

added prompt template

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -53,7 +53,12 @@ image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_co
53
  with open("prompts.yaml", 'r') as stream:
54
  prompt_templates = yaml.safe_load(stream)
55
  print("TOOLS:", [final_answer, my_custom_tool, get_current_time_in_timezone, image_generation_tool])
56
- prompt_templates["final_answer"] = "This is the final answer to the user's query: {output}"
 
 
 
 
 
57
  agent = CodeAgent(
58
  model=model,
59
  tools=[final_answer,get_current_time_in_timezone,my_custom_tool,image_generation_tool], ## add your tools here (don't remove final answer)
 
53
  with open("prompts.yaml", 'r') as stream:
54
  prompt_templates = yaml.safe_load(stream)
55
  print("TOOLS:", [final_answer, my_custom_tool, get_current_time_in_timezone, image_generation_tool])
56
+ prompt_templates["final_answer"] = {
57
+ "pre_messages": [
58
+ {"role": "system", "content": "You are a helpful assistant. Return the final answer clearly."}
59
+ ],
60
+ "format": "{output}"
61
+ }
62
  agent = CodeAgent(
63
  model=model,
64
  tools=[final_answer,get_current_time_in_timezone,my_custom_tool,image_generation_tool], ## add your tools here (don't remove final answer)