Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -83,6 +83,14 @@ with open("prompts.yaml", 'r') as stream:
|
|
83 |
for key in list(prompt_templates.keys()):
|
84 |
if isinstance(prompt_templates[key], str):
|
85 |
prompt_templates[key] = {"content": prompt_templates[key]}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
agent = CodeAgent(
|
88 |
model=model,
|
|
|
83 |
for key in list(prompt_templates.keys()):
|
84 |
if isinstance(prompt_templates[key], str):
|
85 |
prompt_templates[key] = {"content": prompt_templates[key]}
|
86 |
+
|
87 |
+
# Convert final_answer to the required nested structure
|
88 |
+
if 'final_answer' in prompt_templates:
|
89 |
+
prompt_templates['final_answer'] = {
|
90 |
+
'pre_messages': '',
|
91 |
+
'content': prompt_templates['final_answer'],
|
92 |
+
'post_messages': ''
|
93 |
+
}
|
94 |
|
95 |
agent = CodeAgent(
|
96 |
model=model,
|