Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,10 +49,18 @@ image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_co
|
|
| 49 |
# Load system prompt from prompt.yaml file
|
| 50 |
with open("prompts.yaml", 'r') as stream:
|
| 51 |
prompt_templates = yaml.safe_load(stream)
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
agent = CodeAgent(
|
| 54 |
model=model,
|
| 55 |
-
tools=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
max_steps=6,
|
| 57 |
verbosity_level=1,
|
| 58 |
grammar=None,
|
|
|
|
| 49 |
# Load system prompt from prompt.yaml file
|
| 50 |
with open("prompts.yaml", 'r') as stream:
|
| 51 |
prompt_templates = yaml.safe_load(stream)
|
| 52 |
+
|
| 53 |
+
if "final_answer" not in prompt_templates:
|
| 54 |
+
prompt_templates["final_answer"] = "This is the final answer: {answer}"
|
| 55 |
|
| 56 |
agent = CodeAgent(
|
| 57 |
model=model,
|
| 58 |
+
tools=[
|
| 59 |
+
final_answer,
|
| 60 |
+
my_custom_tool,
|
| 61 |
+
get_current_time_in_timezone,
|
| 62 |
+
image_generation_tool
|
| 63 |
+
],
|
| 64 |
max_steps=6,
|
| 65 |
verbosity_level=1,
|
| 66 |
grammar=None,
|