README.md in nano-bots-3.3.0 vs README.md in nano-bots-3.4.0
- old
+ new
@@ -1,17 +1,17 @@
# Nano Bots 💎 🤖
-An implementation of the [Nano Bots](https://spec.nbots.io) specification with support for [Cohere Command](https://cohere.com), [Google Gemini](https://deepmind.google/technologies/gemini), [Maritaca AI MariTalk](https://www.maritaca.ai), [Mistral AI](https://mistral.ai), [Ollama](https://ollama.ai), [OpenAI ChatGPT](https://openai.com/chatgpt), and others, with support for calling tools (functions).
+An implementation of the [Nano Bots](https://spec.nbots.io) specification with support for [Anthropic Claude](https://www.anthropic.com/claude), [Cohere Command](https://cohere.com), [Google Gemini](https://deepmind.google/technologies/gemini), [Maritaca AI Sabiá](https://www.maritaca.ai), [Mistral AI](https://mistral.ai), [Ollama](https://ollama.ai), [OpenAI ChatGPT](https://openai.com/chatgpt), and others, with support for calling tools (functions).
![Ruby Nano Bots](https://raw.githubusercontent.com/icebaker/assets/main/nano-bots/ruby-nano-bots-canvas.png)
https://user-images.githubusercontent.com/113217272/238141567-c58a240c-7b67-4b3b-864a-0f49bbf6e22f.mp4
## TL;DR and Quick Start
```sh
-gem install nano-bots -v 3.3.0
+gem install nano-bots -v 3.4.0
```
```bash
nb - - eval "hello"
# => Hello! How may I assist you today?
@@ -57,11 +57,11 @@
nb gpt.yml - eval "hi"
# => Hello! How can I assist you today?
```
```ruby
-gem 'nano-bots', '~> 3.3.0'
+gem 'nano-bots', '~> 3.4.0'
```
```ruby
require 'nano-bots'
@@ -78,10 +78,11 @@
- [Usage](#usage)
- [Command Line](#command-line)
- [Debugging](#debugging)
- [Library](#library)
- [Setup](#setup)
+ - [Anthropic Claude](#anthropic-claude)
- [Cohere Command](#cohere-command)
- [Maritaca AI MariTalk](#maritaca-ai-maritalk)
- [Mistral AI](#mistral-ai)
- [Ollama](#ollama)
- [OpenAI ChatGPT](#openai-chatgpt)
@@ -98,10 +99,11 @@
- [Cryptography](#cryptography)
- [End-user IDs](#end-user-ids)
- [Decrypting](#decrypting)
- [Supported Providers](#supported-providers)
- [Docker](#docker)
+ - [Anthropic Claude Container](#anthropic-claude-container)
- [Cohere Command Container](#cohere-command-container)
- [Maritaca AI MariTalk Container](#maritaca-ai-maritalk-container)
- [Mistral AI Container](#mistral-ai-container)
- [Ollama Container](#ollama-container)
- [OpenAI ChatGPT Container](#openai-chatgpt-container)
@@ -248,17 +250,17 @@
## Setup
To install the CLI on your system:
```sh
-gem install nano-bots -v 3.3.0
+gem install nano-bots -v 3.4.0
```
To use it in a Ruby project as a library, add to your `Gemfile`:
```ruby
-gem 'nano-bots', '~> 3.3.0'
+gem 'nano-bots', '~> 3.4.0'
```
```sh
bundle install
```
@@ -281,10 +283,63 @@
# NANO_BOTS_STATE_PATH=/home/user/.local/state/nano-bots
# NANO_BOTS_CARTRIDGES_PATH=/home/user/.local/share/nano-bots/cartridges
```
+### Anthropic Claude
+
+You can obtain your credentials on the [Anthropic Console](https://console.anthropic.com).
+
+```sh
+export ANTHROPIC_API_KEY=your-api-key
+```
+
+Alternatively, if your current directory has a `.env` file with the environment variables, they will be automatically loaded:
+
+```sh
+ANTHROPIC_API_KEY=your-api-key
+```
+
+Create a `cartridge.yml` file:
+
+```yaml
+---
+meta:
+ symbol: 🤖
+ name: Nano Bot Name
+ author: Your Name
+ version: 1.0.0
+ license: CC0-1.0
+ description: A helpful assistant.
+
+behaviors:
+ interaction:
+ directive: You are a helpful assistant.
+
+provider:
+ id: anthropic
+ credentials:
+ api-key: ENV/ANTHROPIC_API_KEY
+ settings:
+ model: claude-3-5-sonnet-20240620
+ max_tokens: 4096
+```
+
+Read the [full specification](https://spec.nbots.io/#/README?id=anthropic-claude) for Anthropic Claude.
+
+```bash
+nb cartridge.yml - eval "Hello"
+
+nb cartridge.yml - repl
+```
+
+```ruby
+bot = NanoBot.new(cartridge: 'cartridge.yml')
+
+puts bot.eval('Hello')
+```
+
### Cohere Command
You can obtain your credentials on the [Cohere Platform](https://dashboard.cohere.com).
```sh
@@ -937,11 +992,11 @@
If you lose your password, you lose your data. It is not possible to recover it at all. For real.
## Supported Providers
-- [ ] [Anthropic Claude](https://www.anthropic.com)
+- [x] [Anthropic Claude](https://www.anthropic.com)
- [x] [Cohere Command](https://cohere.com)
- [x] [Google Gemini](https://deepmind.google/technologies/gemini)
- [x] [Maritaca AI MariTalk](https://www.maritaca.ai)
- [x] [Mistral AI](https://mistral.ai)
- [x] [Ollama](https://ollama.ai)
@@ -963,18 +1018,35 @@
cp docker-compose.example.yml docker-compose.yml
```
Set your provider credentials and choose your desired path for the cartridges files:
+### Anthropic Claude Container
+
+```yaml
+---
+services:
+ nano-bots:
+ image: ruby:3.3.3-slim-bookworm
+ command: sh -c "apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev libsodium-dev lua5.4-dev curl && curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | bash && gem install nano-bots -v 3.4.0 && bash"
+ environment:
+ ANTHROPIC_API_KEY: your-api-key
+ NANO_BOTS_ENCRYPTION_PASSWORD: UNSAFE
+ NANO_BOTS_END_USER: your-user
+ volumes:
+ - ./your-cartridges:/root/.local/share/nano-bots/cartridges
+ - ./your-state-path:/root/.local/state/nano-bots
+```
+
### Cohere Command Container
```yaml
---
services:
nano-bots:
image: ruby:3.3.3-slim-bookworm
- command: sh -c "apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev libsodium-dev lua5.4-dev curl && curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | bash && gem install nano-bots -v 3.3.0 && bash"
+ command: sh -c "apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev libsodium-dev lua5.4-dev curl && curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | bash && gem install nano-bots -v 3.4.0 && bash"
environment:
COHERE_API_KEY: your-api-key
NANO_BOTS_ENCRYPTION_PASSWORD: UNSAFE
NANO_BOTS_END_USER: your-user
volumes:
@@ -987,11 +1059,11 @@
```yaml
---
services:
nano-bots:
image: ruby:3.3.3-slim-bookworm
- command: sh -c "apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev libsodium-dev lua5.4-dev curl && curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | bash && gem install nano-bots -v 3.3.0 && bash"
+ command: sh -c "apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev libsodium-dev lua5.4-dev curl && curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | bash && gem install nano-bots -v 3.4.0 && bash"
environment:
MARITACA_API_KEY: your-api-key
NANO_BOTS_ENCRYPTION_PASSWORD: UNSAFE
NANO_BOTS_END_USER: your-user
volumes:
@@ -1004,11 +1076,11 @@
```yaml
---
services:
nano-bots:
image: ruby:3.3.3-slim-bookworm
- command: sh -c "apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev libsodium-dev lua5.4-dev curl && curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | bash && gem install nano-bots -v 3.3.0 && bash"
+ command: sh -c "apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev libsodium-dev lua5.4-dev curl && curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | bash && gem install nano-bots -v 3.4.0 && bash"
environment:
MISTRAL_API_KEY: your-api-key
NANO_BOTS_ENCRYPTION_PASSWORD: UNSAFE
NANO_BOTS_END_USER: your-user
volumes:
@@ -1023,11 +1095,11 @@
```yaml
---
services:
nano-bots:
image: ruby:3.3.3-slim-bookworm
- command: sh -c "apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev libsodium-dev lua5.4-dev curl && curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | bash && gem install nano-bots -v 3.3.0 && bash"
+ command: sh -c "apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev libsodium-dev lua5.4-dev curl && curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | bash && gem install nano-bots -v 3.4.0 && bash"
environment:
OLLAMA_API_ADDRESS: http://localhost:11434
NANO_BOTS_ENCRYPTION_PASSWORD: UNSAFE
NANO_BOTS_END_USER: your-user
volumes:
@@ -1042,11 +1114,11 @@
```yaml
---
services:
nano-bots:
image: ruby:3.3.3-slim-bookworm
- command: sh -c "apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev libsodium-dev lua5.4-dev curl && curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | bash && gem install nano-bots -v 3.3.0 && bash"
+ command: sh -c "apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev libsodium-dev lua5.4-dev curl && curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | bash && gem install nano-bots -v 3.4.0 && bash"
environment:
OPENAI_API_KEY: your-access-token
NANO_BOTS_ENCRYPTION_PASSWORD: UNSAFE
NANO_BOTS_END_USER: your-user
volumes:
@@ -1061,11 +1133,11 @@
```yaml
---
services:
nano-bots:
image: ruby:3.3.3-slim-bookworm
- command: sh -c "apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev libsodium-dev lua5.4-dev curl && curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | bash && gem install nano-bots -v 3.3.0 && bash"
+ command: sh -c "apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev libsodium-dev lua5.4-dev curl && curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | bash && gem install nano-bots -v 3.4.0 && bash"
environment:
GOOGLE_API_KEY: your-api-key
NANO_BOTS_ENCRYPTION_PASSWORD: UNSAFE
NANO_BOTS_END_USER: your-user
volumes:
@@ -1078,11 +1150,11 @@
```yaml
---
services:
nano-bots:
image: ruby:3.3.3-slim-bookworm
- command: sh -c "apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev libsodium-dev lua5.4-dev curl && curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | bash && gem install nano-bots -v 3.3.0 && bash"
+ command: sh -c "apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev libsodium-dev lua5.4-dev curl && curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | bash && gem install nano-bots -v 3.4.0 && bash"
environment:
GOOGLE_CREDENTIALS_FILE_PATH: /root/.config/google-credentials.json
GOOGLE_REGION: us-east4
NANO_BOTS_ENCRYPTION_PASSWORD: UNSAFE
NANO_BOTS_END_USER: your-user
@@ -1097,11 +1169,11 @@
```yaml
---
services:
nano-bots:
image: ruby:3.3.3-slim-bookworm
- command: sh -c "apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev libsodium-dev lua5.4-dev curl && curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | bash && gem install nano-bots -v 3.3.0 && bash"
+ command: sh -c "apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev libsodium-dev lua5.4-dev curl && curl -s https://raw.githubusercontent.com/babashka/babashka/master/install | bash && gem install nano-bots -v 3.4.0 && bash"
environment:
GOOGLE_REGION: us-east4
NANO_BOTS_ENCRYPTION_PASSWORD: UNSAFE
NANO_BOTS_END_USER: your-user
volumes:
@@ -1159,7 +1231,7 @@
```bash
gem build nano-bots.gemspec
gem signin
-gem push nano-bots-3.3.0.gem
+gem push nano-bots-3.4.0.gem
```