Stoyan Georgiev commited on
Commit
473200a
·
1 Parent(s): d3cfa61

Updated the Space with new features

Browse files
Files changed (1) hide show
  1. app.py +7 -14
app.py CHANGED
@@ -21,26 +21,19 @@ 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
- """
25
- Returns the current local time for a given timezone.
26
 
27
- Args:
28
- timezone (str): The timezone string (e.g., 'Europe/Berlin', 'America/New_York').
29
 
30
  Returns:
31
- str: The current time as a string in the specified timezone.
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 = {
36
- "new york": "America/New_York",
37
- "new york city": "America/New_York",
38
- "nyc": "America/New_York",
39
- # Füge hier weitere Mappings hinzu, falls nötig
40
- }
41
- key = timezone.lower().strip()
42
- if key in timezone_mapping:
43
- timezone = timezone_mapping[key]
44
 
45
  try:
46
  tz = pytz.timezone(timezone)
 
21
 
22
  @tool
23
  def get_current_time_in_timezone(timezone: str) -> str:
24
+ """
25
+ Get the current time in a specified timezone.
26
 
27
+ Args:
28
+ timezone (str): The name of the timezone (e.g., 'America/New_York').
29
 
30
  Returns:
31
+ str: The current time in the specified timezone in ISO 8601 format.
32
  """
33
  # Falls der Nutzer eine Stadt statt eines gültigen Zeitzonen-IDs angibt,
34
  # können wir eine Mapping-Tabelle verwenden.
35
+ def get_current_time_in_timezone(timezone: str) -> str:
36
+
 
 
 
 
 
 
 
37
 
38
  try:
39
  tz = pytz.timezone(timezone)