TanishDevX commited on
Commit
f26d94d
·
verified ·
1 Parent(s): 8c5c24b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -32,6 +32,16 @@ def get_current_time_in_timezone(timezone: str) -> str:
32
  return f"The current local time in {timezone} is: {local_time}"
33
  except Exception as e:
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
 
 
 
 
 
 
 
 
 
 
35
 
36
 
37
  final_answer = FinalAnswerTool()
 
32
  return f"The current local time in {timezone} is: {local_time}"
33
  except Exception as e:
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
+ @tool
36
+ def get_weather(city: str) -> str:
37
+ """Fetched the weather for a given city
38
+ Args:
39
+ city: The input to process.
40
+ """
41
+ try:
42
+ Call an api to get the weather for specified city
43
+ except Exception as e:
44
+ return f"Error in get_weather: {str(e)}"
45
 
46
 
47
  final_answer = FinalAnswerTool()