README.md in nano-bots-0.0.7 vs README.md in nano-bots-0.0.8
- old
+ new
@@ -21,17 +21,17 @@
## Setup
For a system usage:
```sh
-gem install nano-bots -v 0.0.7
+gem install nano-bots -v 0.0.8
```
To use it in a project, add it to your `Gemfile`:
```ruby
-gem 'nano-bots', '~> 0.0.7'
+gem 'nano-bots', '~> 0.0.8'
```
```sh
bundle install
```
@@ -74,11 +74,11 @@
version: '3.7'
services:
nano-bots:
image: ruby:3.2.2-slim-bullseye
- command: sh -c "gem install nano-bots -v 0.0.7 && bash"
+ command: sh -c "gem install nano-bots -v 0.0.8 && bash"
environment:
OPENAI_API_ADDRESS: https://api.openai.com
OPENAI_API_ACCESS_TOKEN: your-token
OPENAI_API_USER_IDENTIFIER: your-user
volumes:
@@ -191,29 +191,59 @@
NanoBot.repl(cartridge: 'cartridge.yml') # Starts a new REPL.
bot = NanoBot.new(cartridge: 'cartridge.yml')
+bot = NanoBot.new(
+ cartridge: YAML.safe_load(File.read('cartridge.yml'), permitted_classes: [Symbol])
+)
+
+bot = NanoBot.new(
+ cartridge: { ... } # Parsed Cartridge Hash
+)
+
bot.eval('Hello')
+bot.eval('Hello', as: 'eval')
+bot.eval('Hello', as: 'repl')
+
+# When stream is enabled and available:
+bot.eval('Hi!') do |content, fragment, finished|
+ print fragment unless fragment.nil?
+end
+
bot.repl # Starts a new REPL.
NanoBot.repl(cartridge: 'cartridge.yml', state: '6ea6c43c42a1c076b1e3c36fa349ac2c')
bot = NanoBot.new(cartridge: 'cartridge.yml', state: '6ea6c43c42a1c076b1e3c36fa349ac2c')
+
+bot.prompt # => "🤖\u001b[34m> \u001b[0m"
+
+bot.boot
+
+bot.boot(as: 'eval')
+bot.boot(as: 'repl')
+
+bot.boot do |content, fragment, finished|
+ print fragment unless fragment.nil?
+end
```
## Cartridges
Here's what a Nano Bot Cartridge looks like:
```yaml
---
meta:
+ symbol: 🤖
name: Nano Bot Name
author: Your Name
- version: 0.0.1
+ version: 1.0.0
+ license: CC0-1.0
+ description: A helpful assistant.
behaviors:
interaction:
directive: You are a helpful assistant.
@@ -225,22 +255,26 @@
address: ENV/OPENAI_API_ADDRESS
access-token: ENV/OPENAI_API_ACCESS_TOKEN
user-identifier: ENV/OPENAI_API_USER_IDENTIFIER
```
-Check the Nano Bots specification to learn more about [how to build cartridges](https://icebaker.github.io/nano-bots/#/README?id=cartridges).
+Check the Nano Bots specification to learn more about [how to build cartridges](https://spec.nbots.io/#/README?id=cartridges).
+Try the [Nano Bots Clinic (Live Editor)](https://clinic.nbots.io) to learn about creating Cartridges.
+
## Providers
Currently supported providers:
-- [ ] [Vicuna](https://github.com/lm-sys/FastChat)
+- [x] [FastChat (Vicuna)](https://github.com/lm-sys/FastChat)
- [x] [Open AI](https://platform.openai.com/docs/api-reference)
- [ ] [Google PaLM](https://developers.generativeai.google/)
- [ ] [Alpaca](https://github.com/tatsu-lab/stanford_alpaca)
- [ ] [LLaMA](https://github.com/facebookresearch/llama)
+Although only OpenAI has been officially tested, some of the open-source providers offer APIs that are compatible with OpenAI, such as [FastChat](https://github.com/lm-sys/FastChat#openai-compatible-restful-apis--sdk). Therefore, it is highly probable that they will work just fine.
+
## Development
```bash
bundle
rubocop -A
@@ -252,7 +286,7 @@
```bash
gem build nano-bots.gemspec
gem signin
-gem push nano-bots-0.0.7.gem
+gem push nano-bots-0.0.8.gem
```