Spaces:
Sleeping
Sleeping
feet(tool): add a custom tool to calculate rectangle area
Browse files8 unmodified lines910111213141213141617151617191819202122232432 unmodified lines57585958606162638 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 yet def my_custom_tool(arg1:int, arg2:int)-> str: """A tool that calculate the area of a rectangle Args: arg1: the first argument arg2: the second argument arg1: The width of a rectangle arg2: The length of a rectangle """ return "What magic will you build ?" area = str(arg1 * arg2) return f"The area of the rectangle is {area}."
@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], ## add your tools here (don't remove final answer) max_steps=6, verbosity_level=1, grammar=None,app.py+9-7