Spaces:
Configuration error
Configuration error
Scott Cogan commited on
Commit ·
2b2c5c3
1
Parent(s): 501010d
more debug
Browse files
app.py
CHANGED
|
@@ -265,6 +265,18 @@ class CustomCodeAgent(CodeAgent):
|
|
| 265 |
authorized_imports=getattr(self, 'authorized_imports', [])
|
| 266 |
)
|
| 267 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 268 |
print("[DEBUG] Creating agent instance...")
|
| 269 |
agent = CustomCodeAgent(
|
| 270 |
model=model,
|
|
|
|
| 265 |
authorized_imports=getattr(self, 'authorized_imports', [])
|
| 266 |
)
|
| 267 |
|
| 268 |
+
def run(self, question_text: str, stream: bool = True):
|
| 269 |
+
print("DEBUG: About to render template for question", question_text)
|
| 270 |
+
print("DEBUG: tools_dict keys:", list(self.tools_dict.keys()))
|
| 271 |
+
for k, v in self.tools_dict.items():
|
| 272 |
+
print("DEBUG: tools_dict[{}] = {} ({})".format(k, v, type(v)))
|
| 273 |
+
print("DEBUG: tools variable type:", type(self.tools))
|
| 274 |
+
print("DEBUG: tools variable value:", self.tools)
|
| 275 |
+
|
| 276 |
+
# Then render the system prompt as before
|
| 277 |
+
system_prompt = self.template_manager.render_template("system_prompt", tools=self.tools_dict, managed_agents=self.managed_agents, authorized_imports=self.authorized_imports)
|
| 278 |
+
return super().run(question_text, stream)
|
| 279 |
+
|
| 280 |
print("[DEBUG] Creating agent instance...")
|
| 281 |
agent = CustomCodeAgent(
|
| 282 |
model=model,
|