Stoyan Georgiev commited on
Commit
e0c8b90
·
1 Parent(s): 8166b8e

Updated the Space with new features

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -21,6 +21,15 @@ def my_cutom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
21
 
22
  @tool
23
  def get_current_time_in_timezone(timezone: str) -> str:
 
 
 
 
 
 
 
 
 
24
  # Falls der Nutzer eine Stadt statt eines gültigen Zeitzonen-IDs angibt,
25
  # können wir eine Mapping-Tabelle verwenden.
26
  timezone_mapping = {
@@ -40,7 +49,6 @@ def get_current_time_in_timezone(timezone: str) -> str:
40
  except Exception as e:
41
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
42
 
43
-
44
  final_answer = FinalAnswerTool()
45
  model = HfApiModel(
46
  max_tokens=2096,
 
21
 
22
  @tool
23
  def get_current_time_in_timezone(timezone: str) -> str:
24
+ """
25
+ Returns the current local time for a given timezone.
26
+
27
+ Args:
28
+ timezone (str): A valid timezone identifier (e.g. "America/New_York") or a recognized city alias.
29
+
30
+ Returns:
31
+ str: A string indicating the current time in the specified timezone or an error message.
32
+ """
33
  # Falls der Nutzer eine Stadt statt eines gültigen Zeitzonen-IDs angibt,
34
  # können wir eine Mapping-Tabelle verwenden.
35
  timezone_mapping = {
 
49
  except Exception as e:
50
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
51
 
 
52
  final_answer = FinalAnswerTool()
53
  model = HfApiModel(
54
  max_tokens=2096,