Spaces:
Sleeping
Sleeping
Update app.py
Browse files8 unmodified lines910111213141516171819202122238 unmodified lines# Below is an example of a tool that does nothing. Amaze us with your creativity !@tooldef my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type#Keep this format for the description / args / args description but feel free to modify the tool"""A tool that does nothing yetArgs:arg1: the first argumentarg2: the second argument"""return "What magic will you build ?"@tooldef get_current_time_in_timezone(timezone: str) -> str:"""A tool that fetches the current local time in a specified timezone.8 unmodified lines910111213141516171819202122232425262728293031328 unmodified lines# Below is an example of a tool that does nothing. Amaze us with your creativity !@tooldef time_zone_region(time_zone:str)-> str: #it's import to specify the return type#Keep this format for the description / args / args description but feel free to modify the tool"""A tool that takes user input and returns the time in a specified time-zoneArgs:time zone (str): Integers separated by colons reperesenting the hours:minutes:secondsReturns "The time-zone of desired region""""try:search_tool = DuckDuckGoSearchTool()query = f"What is the time zone? {time_zone}"search_results = search_tool(query)if search_results:return search_resultselse:return f"I couldn't find the category for the {time_zone}."except Exception as e:return f"Error fetching category for the term {time_zone}: {str(e)}"@tooldef get_current_time_in_timezone(timezone: str) -> str:"""A tool that fetches the current local time in a specified timezone.
app.py+15-6