marksml commited on
Commit
025d2a3
·
1 Parent(s): 852fbf0

fix code get time tool

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -25,6 +25,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
25
  timezone: A string representing a valid timezone (e.g., 'America/New_York').
26
  """
27
  try:
 
28
  # Create timezone object
29
  tz = pytz.timezone(timezone)
30
  # Get current time in that timezone
@@ -55,7 +56,7 @@ with open("prompts.yaml", 'r') as stream:
55
 
56
  agent = CodeAgent(
57
  model=model,
58
- tools=[final_answer], ## add your tools here (don't remove final answer)
59
  max_steps=6,
60
  verbosity_level=1,
61
  grammar=None,
 
25
  timezone: A string representing a valid timezone (e.g., 'America/New_York').
26
  """
27
  try:
28
+ print(f"Fetching current time with Tool 'get_current_time_in_timezone': {timezone}")
29
  # Create timezone object
30
  tz = pytz.timezone(timezone)
31
  # Get current time in that timezone
 
56
 
57
  agent = CodeAgent(
58
  model=model,
59
+ tools=[final_answer, get_current_time_in_timezone], ## add your tools here (don't remove final answer)
60
  max_steps=6,
61
  verbosity_level=1,
62
  grammar=None,