Comment

Comment by hathym

but still struggle when changing the quesion:

  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.
parent hathym 2 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton