Spaces:
Sleeping
Sleeping
Add tools to the agent.
Browse files10 unmodified lines1112131414151617161718191920212232 unmodified lines555657585859606110 unmodified lines@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 yet """A tool that adds two numbers Args: arg1: the first argument arg2: the second argument arg1: the first number arg2: the second number """ return "What magic will you build ?" return arg1 + arg2
@tooldef get_current_time_in_timezone(timezone: str) -> str:32 unmodified lines agent = CodeAgent( model=model, tools=[final_answer], ## add your tools here (don't remove final answer) tools=[final_answer, my_custom_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+5-5