icebaker / ruby-nano-bots

Ruby Implementation of Nano Bots: small, AI-powered bots that can be easily shared as a single file, designed to support multiple providers such as Anthropic Claude, Cohere Command, Google Gemini, Maritaca AI, Mistral AI, Ollama, OpenAI ChatGPT, and others, with support for calling tools (functions).
https://rubygems.org/gems/nano-bots
MIT License
79 stars 10 forks source link

Adding tools medatada #8

Closed icebaker closed 7 months ago

icebaker commented 7 months ago

Adding metadata to tools in streaming callbacks:

bot.eval('what time is it?') do |_, _, _, meta|
  puts meta.inspect
end

Fixed an issue that caused Nano Bots to enter an infinite loop when the REPL boot directive triggered a function call:

---
behaviors:
  boot:
    directive: You are a helpful assistant.
    instruction: Provide a welcome message and share the current time with the user.

Upgrading to ruby-openai 6.3.1