logoalt Hacker News

hathymyesterday at 10:21 PM2 repliesview on HN

works better that way, thanks :)


Replies

hathymyesterday at 10:23 PM

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.
show 1 reply
HenryNdubuakuyesterday at 10:21 PM

Thanks, we shall improve this for the next release.