Yago Bolivar
commited on
Commit
·
338d856
1
Parent(s):
9cc4c71
feat: add handling for system_prompt to flatten dict structure in agent configuration (yet another patch)
Browse files
app.py
CHANGED
@@ -163,6 +163,12 @@ agent_tools = [
|
|
163 |
video_processing_tool
|
164 |
]
|
165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
# Enhanced agent configuration for HF Spaces optimization
|
167 |
agent = EnhancedCodeAgent(
|
168 |
model=model,
|
|
|
163 |
video_processing_tool
|
164 |
]
|
165 |
|
166 |
+
# Flatten system_prompt if it's a dict (e.g., from YAML)
|
167 |
+
if isinstance(prompt_templates.get("system_prompt"), dict):
|
168 |
+
# Use the 'main' variant by default
|
169 |
+
prompt_templates["system_prompt"] = prompt_templates["system_prompt"].get("main", "")
|
170 |
+
|
171 |
+
|
172 |
# Enhanced agent configuration for HF Spaces optimization
|
173 |
agent = EnhancedCodeAgent(
|
174 |
model=model,
|