summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gemfile.lock2
-rw-r--r--README.md8
-rw-r--r--controllers/interfaces/eval.rb6
-rw-r--r--controllers/interfaces/repl.rb10
-rw-r--r--docker-compose.example.yml2
-rw-r--r--static/gem.rb2
6 files changed, 17 insertions, 13 deletions
diff --git a/Gemfile.lock b/Gemfile.lock
index bd2525f..733052a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- nano-bots (0.0.1)
+ nano-bots (0.0.2)
babosa (~> 2.0)
dotenv (~> 2.8, >= 2.8.1)
faraday (~> 2.7, >= 2.7.4)
diff --git a/README.md b/README.md
index 4a3e714..5d0bb3b 100644
--- a/README.md
+++ b/README.md
@@ -21,13 +21,13 @@ https://user-images.githubusercontent.com/113217272/237840989-1e29a5cc-6644-48d0
For a system usage:
```sh
-gem install nano-bots -v 0.0.1
+gem install nano-bots -v 0.0.2
```
To use it in a project, add it to your `Gemfile`:
```ruby
-gem 'nano-bots', '~> 0.0.1'
+gem 'nano-bots', '~> 0.0.2'
```
```sh
@@ -65,7 +65,7 @@ version: '3.7'
services:
nano-bots:
image: ruby:3.2.2-slim-bullseye
- command: sh -c "gem install nano-bots -v 0.0.1 && bash"
+ command: sh -c "gem install nano-bots -v 0.0.2 && bash"
environment:
OPENAI_API_ADDRESS: https://api.openai.com
OPENAI_API_ACCESS_TOKEN: your-token
@@ -213,5 +213,5 @@ gem build nano-bots.gemspec
gem signin
-gem push nano-bots-0.0.1.gem
+gem push nano-bots-0.0.2.gem
```
diff --git a/controllers/interfaces/eval.rb b/controllers/interfaces/eval.rb
index 6cb12b4..af519ab 100644
--- a/controllers/interfaces/eval.rb
+++ b/controllers/interfaces/eval.rb
@@ -21,14 +21,16 @@ module NanoBot
end
def self.build_prefix(cartridge)
- eval_interface = Logic::Helpers::Hash.fetch(cartridge, %i[interfaces eval])
+ eval_interface = Logic::Helpers::Hash.fetch(cartridge, %i[interfaces eval])
return nil if eval_interface.nil?
+
eval_interface[:prefix]
end
def self.build_postfix(cartridge)
- eval_interface = Logic::Helpers::Hash.fetch(cartridge, %i[interfaces eval])
+ eval_interface = Logic::Helpers::Hash.fetch(cartridge, %i[interfaces eval])
return "\n" if eval_interface.nil? || !eval_interface.key?(:postfix) # default
+
eval_interface[:postfix]
end
end
diff --git a/controllers/interfaces/repl.rb b/controllers/interfaces/repl.rb
index 5477c33..9415674 100644
--- a/controllers/interfaces/repl.rb
+++ b/controllers/interfaces/repl.rb
@@ -40,14 +40,16 @@ module NanoBot
end
def self.build_prefix(cartridge)
- repl = Logic::Helpers::Hash.fetch(cartridge, %i[interfaces repl])
+ repl = Logic::Helpers::Hash.fetch(cartridge, %i[interfaces repl])
return "\n" if repl.nil? || !repl.key?(:prefix) # default
+
repl[:prefix]
end
def self.build_postfix(cartridge)
- repl = Logic::Helpers::Hash.fetch(cartridge, %i[interfaces repl])
+ repl = Logic::Helpers::Hash.fetch(cartridge, %i[interfaces repl])
return "\n" if repl.nil? || !repl.key?(:postfix) # default
+
repl[:postfix]
end
@@ -63,9 +65,9 @@ module NanoBot
end
end
elsif prompt.is_a?(String)
- result = prompt
+ result = prompt
else
- result = '🤖' + Rainbow('> ').blue
+ result = "🤖#{Rainbow('> ').blue}"
end
result
diff --git a/docker-compose.example.yml b/docker-compose.example.yml
index 0129c74..1ec49c1 100644
--- a/docker-compose.example.yml
+++ b/docker-compose.example.yml
@@ -3,7 +3,7 @@ version: '3.7'
services:
nano-bots:
image: ruby:3.2.2-slim-bullseye
- command: sh -c "gem install nano-bots -v 0.0.1 && bash"
+ command: sh -c "gem install nano-bots -v 0.0.2 && bash"
environment:
OPENAI_API_ADDRESS: https://api.openai.com
OPENAI_API_ACCESS_TOKEN: your-token
diff --git a/static/gem.rb b/static/gem.rb
index 135f801..7cf61ab 100644
--- a/static/gem.rb
+++ b/static/gem.rb
@@ -3,7 +3,7 @@
module NanoBot
GEM = {
name: 'nano-bots',
- version: '0.0.1',
+ version: '0.0.2',
author: 'icebaker',
summary: 'Ruby Implementation of Nano Bots: small, AI-powered bots',
description: 'Ruby Implementation of Nano Bots: small, AI-powered bots easily shared as a single file, designed to support multiple providers such as Vicuna, OpenAI ChatGPT, Google PaLM, Alpaca, and LLaMA.',