Spaces:
Sleeping
Sleeping
Update app.py
Browse files13 unmodified lines141516171819202122232425262728293031323330 unmodified lines6465666768697013 unmodified linesArgs:arg1: the first integerarg2: the second integerarg3: the operator. Supported operations are +,-,*,"""match arg3:case "*":return arg1 * arg2case "/":if(arg2!=0)return arg1 / arg2elsereturn f"Error: Division by zero not possible"case "+":return arg1 + arg2case "-":return arg1 - arg2case _:return f"Error: '{arg3}' is an unsupported operation, Supported operations are +,-,*,/"30 unmodified linesagent = CodeAgent(model=model,tools=[final_answer], ## add your tools here (don't remove final answer)max_steps=6,verbosity_level=1,grammar=None,13 unmodified lines141516171819202122232425262728293031323330 unmodified lines6465666768697013 unmodified linesArgs:arg1: the first integerarg2: the second integerarg3: the operator as string. Supported operations are "+","-","*","/""""match arg3:case "*":return f"The result is: '{arg1 * arg2}'"case "/":if(arg2!=0)return f"The result is: '{arg1 / arg2}'"elsereturn f"Error: Division by zero not possible"case "+":return f"The result is: '{arg1 + arg2}'"case "-":return f"The result is: '{arg1 - arg2}'"case _:return f"Error: '{arg3}' is an unsupported operation, Supported operations are +,-,*,/"30 unmodified linesagent = CodeAgent(model=model,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+6-6