Spaces:
Sleeping
Sleeping
Update app.py
Browse filesAdded created my custom tool and added it and the time zone tool to the agent's tool box.
8 unmodified lines9101112121314141516171617191819202122232428 unmodified lines53545554565758598 unmodified lines
# Below is an example of a tool that does nothing. Amaze us with your creativity !@tooldef my_cutom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return typedef my_cutom_tool(query: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 does nothing yet """A tool that fetches information from a browser. Args: arg1: the first argument arg2: the second argument query: A string representing the text the user want to search in the browser. """ return "What magic will you build ?" search_tool = DuckDuckGoSearchTool() query_result = search_tool(query) return query_result
@tooldef get_current_time_in_timezone(timezone: str) -> str:28 unmodified lines agent = CodeAgent( model=model, tools=[final_answer], ## add your tools here (don't remove final answer) tools=[final_answer, my_cutom_tool, get_current_time_in_timezone], ## add your tools here (don't remove final answer) max_steps=6, verbosity_level=1, grammar=None,app.py+8-6