Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -144,25 +144,25 @@ IMAGE_RULE = (
|
|
| 144 |
"Always finish by calling final_answer(<plain text> with any IMAGE lines)."
|
| 145 |
)
|
| 146 |
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
"You are a helpful coding agent. Use tools when helpful. "
|
| 150 |
-
"Prefer concise answers. "
|
| 151 |
+ IMAGE_RULE
|
| 152 |
),
|
| 153 |
-
|
| 154 |
-
"
|
| 155 |
-
"
|
|
|
|
| 156 |
),
|
| 157 |
-
|
| 158 |
-
"
|
| 159 |
-
"
|
| 160 |
),
|
| 161 |
-
|
| 162 |
-
"
|
| 163 |
-
"
|
| 164 |
),
|
| 165 |
-
|
| 166 |
|
| 167 |
# Start with defaults, let user overrides replace them
|
| 168 |
prompt_templates = {**DEFAULT_PROMPTS, **(user_prompts or {})}
|
|
|
|
| 144 |
"Always finish by calling final_answer(<plain text> with any IMAGE lines)."
|
| 145 |
)
|
| 146 |
|
| 147 |
+
prompt_templates = PromptTemplates(
|
| 148 |
+
system_prompt=(
|
| 149 |
+
"You are a helpful coding agent. Use tools when helpful. Prefer concise answers. "
|
|
|
|
| 150 |
+ IMAGE_RULE
|
| 151 |
),
|
| 152 |
+
planning=PlanningPromptTemplate(
|
| 153 |
+
plan="Briefly plan steps before acting when needed.",
|
| 154 |
+
update_plan_pre_messages="Update the plan considering the latest observation.",
|
| 155 |
+
update_plan_post_messages="Summarize the updated plan."
|
| 156 |
),
|
| 157 |
+
managed_agent=ManagedAgentPromptTemplate(
|
| 158 |
+
task="You are delegated a subtask: {task}. Follow the manager's instructions.",
|
| 159 |
+
report="Return a clear, concise report of what you did and the result."
|
| 160 |
),
|
| 161 |
+
final_answer=FinalAnswerPromptTemplate(
|
| 162 |
+
pre_messages="Provide the final answer the user should see.",
|
| 163 |
+
post_messages="End of answer."
|
| 164 |
),
|
| 165 |
+
)
|
| 166 |
|
| 167 |
# Start with defaults, let user overrides replace them
|
| 168 |
prompt_templates = {**DEFAULT_PROMPTS, **(user_prompts or {})}
|