Spaces:
Runtime error
Runtime error
Scott Cogan commited on
Commit ·
d61deee
1
Parent(s): e56e6b6
feat: add debug logging to inspect tools list and verify tool attributes
Browse files
app.py
CHANGED
|
@@ -199,6 +199,19 @@ tools = [
|
|
| 199 |
GetCurrentTimeInTimezoneTool() # This is a Tool subclass
|
| 200 |
]
|
| 201 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
# Verify all tools are proper Tool instances and have required attributes
|
| 203 |
for tool in tools:
|
| 204 |
if not isinstance(tool, Tool):
|
|
|
|
| 199 |
GetCurrentTimeInTimezoneTool() # This is a Tool subclass
|
| 200 |
]
|
| 201 |
|
| 202 |
+
# Debug prints to inspect tools
|
| 203 |
+
logger.debug("Inspecting tools list:")
|
| 204 |
+
for i, tool in enumerate(tools):
|
| 205 |
+
logger.debug(f"Tool {i}: {tool}")
|
| 206 |
+
logger.debug(f" Type: {type(tool)}")
|
| 207 |
+
logger.debug(f" Is Tool instance: {isinstance(tool, Tool)}")
|
| 208 |
+
logger.debug(f" Has name: {hasattr(tool, 'name')}")
|
| 209 |
+
logger.debug(f" Has description: {hasattr(tool, 'description')}")
|
| 210 |
+
if hasattr(tool, 'name'):
|
| 211 |
+
logger.debug(f" Name: {tool.name}")
|
| 212 |
+
if hasattr(tool, 'description'):
|
| 213 |
+
logger.debug(f" Description: {tool.description}")
|
| 214 |
+
|
| 215 |
# Verify all tools are proper Tool instances and have required attributes
|
| 216 |
for tool in tools:
|
| 217 |
if not isinstance(tool, Tool):
|