import needle
@needle.tool
def add(a: int, b: int):
"Calculate the sum of two numbers. Use for any arithmetic or math question."
return a + b
agent = needle.Needle(tools=[add])
print(agent.run("what is 5 + 7?")["reasoning"])
>> No calculator or math tool available. Cannot compute numbers.
but still struggle when changing the quesion:
>> No calculator or math tool available. Cannot compute numbers.