Scott Cogan commited on
Commit
cda00a8
·
1 Parent(s): d61deee

feat: add tools dictionary for template rendering and additional debug logging

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -219,6 +219,12 @@ for tool in tools:
219
  if not hasattr(tool, 'name') or not hasattr(tool, 'description'):
220
  raise AttributeError(f"Tool {tool} is missing required attributes (name or description)")
221
 
 
 
 
 
 
 
222
  agent = CodeAgent(
223
  model=model,
224
  tools=tools, # Pass tools as a list of Tool instances
 
219
  if not hasattr(tool, 'name') or not hasattr(tool, 'description'):
220
  raise AttributeError(f"Tool {tool} is missing required attributes (name or description)")
221
 
222
+ # Create a dictionary of tools for template rendering
223
+ tools_dict = {tool.name: tool for tool in tools}
224
+ logger.debug("Created tools dictionary:")
225
+ for name, tool in tools_dict.items():
226
+ logger.debug(f" {name}: {tool}")
227
+
228
  agent = CodeAgent(
229
  model=model,
230
  tools=tools, # Pass tools as a list of Tool instances