ruby-nano-bots

(โ˜… 125)

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).

  • .gitignore
  • .rspec
  • .rubocop.yml
  • .ruby-version
  • docker-compose.example.yml
  • Gemfile
  • Gemfile.lock
  • LICENSE
  • nano-bots.gemspec
  • README.md

# Installation Guide

1. Get the code
git clone https://github.com/icebaker/ruby-nano-bots

Downloads the entire project code from GitHub to your computer.

cd ruby-nano-bots

Moves into the project folder you just downloaded.

2. Official Install Script

Easy Recommended
Prerequisites
  • Ruby Ruby is required to use gem.
gem install nano-bots -v 3.4.0

Installs the package published on RubyGems directly.

curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | sudo bash

Type this command into your terminal and run it.

โœ… After installing, open a new terminal and run the program's version command (e.g. --version) to confirm it worked.

Pulled directly from this repo's README.

3. Docker

Easy
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
cp docker-compose.example.yml docker-compose.yml

Runs the command against the services defined in the compose file.

docker compose run nano-bots

Runs the command against the services defined in the compose file.

โœ… Run docker compose ps to check the containers are Up. If the README mentions a port, open http://localhost:PORT in your browser.

Pulled directly from this repo's README.

4. Ruby

Easy
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Ruby Ruby is required to use the bundle command.
bundle install

Installs the Ruby libraries listed in the Gemfile.

bundle

Type this command into your terminal and run it.

bundle exec ruby spec/tasks/run-all-models.rb

Type this command into your terminal and run it.

bundle exec ruby spec/tasks/run-model.rb spec/data/cartridges/models/openai/gpt-4-turbo.yml

Type this command into your terminal and run it.

bundle exec ruby spec/tasks/run-model.rb spec/data/cartridges/models/openai/gpt-4-turbo.yml stream

Type this command into your terminal and run it.

โœ… If bundle install finishes without errors, continue with the run command from the README (e.g. rails server).

Pulled directly from this repo's README.

// repository documentation