Spaces:
Sleeping
Sleeping
added prompt template
Browse files
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"] =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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)
|