nano-bots 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +4 -4
- data/controllers/instance.rb +15 -11
- data/docker-compose.example.yml +1 -1
- data/static/gem.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73bb77d7db0d570b10ac2b267c6fc2c550c19933bd68c96bc56c926ff4df013d
|
4
|
+
data.tar.gz: 4a945487832c8deef8513d6cb16c518b078e075b50435b4e5ae898a80090dd2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 777872e14cb28d72597b4734f1ccd0ecf57b3613b5a4da451662120bb6e2eb7ce8530e86c009b5f3cbff1e8ae10c5e15016551afe75f0cfd773ad0df44f657a0
|
7
|
+
data.tar.gz: 4e7dcf5b6087c2387660e379ae2c4c9dc5cd247a146f25fc4a97b472a9467e5ca8d7fab7e0629c2f5698a4851a4fe73eca5c248cbfb3ac18ccbb26678ba72547
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -23,13 +23,13 @@ https://user-images.githubusercontent.com/113217272/238141567-c58a240c-7b67-4b3b
|
|
23
23
|
For a system usage:
|
24
24
|
|
25
25
|
```sh
|
26
|
-
gem install nano-bots -v 0.0.
|
26
|
+
gem install nano-bots -v 0.0.7
|
27
27
|
```
|
28
28
|
|
29
29
|
To use it in a project, add it to your `Gemfile`:
|
30
30
|
|
31
31
|
```ruby
|
32
|
-
gem 'nano-bots', '~> 0.0.
|
32
|
+
gem 'nano-bots', '~> 0.0.7'
|
33
33
|
```
|
34
34
|
|
35
35
|
```sh
|
@@ -76,7 +76,7 @@ version: '3.7'
|
|
76
76
|
services:
|
77
77
|
nano-bots:
|
78
78
|
image: ruby:3.2.2-slim-bullseye
|
79
|
-
command: sh -c "gem install nano-bots -v 0.0.
|
79
|
+
command: sh -c "gem install nano-bots -v 0.0.7 && bash"
|
80
80
|
environment:
|
81
81
|
OPENAI_API_ADDRESS: https://api.openai.com
|
82
82
|
OPENAI_API_ACCESS_TOKEN: your-token
|
@@ -254,5 +254,5 @@ gem build nano-bots.gemspec
|
|
254
254
|
|
255
255
|
gem signin
|
256
256
|
|
257
|
-
gem push nano-bots-0.0.
|
257
|
+
gem push nano-bots-0.0.7.gem
|
258
258
|
```
|
data/controllers/instance.rb
CHANGED
@@ -53,18 +53,22 @@ module NanoBot
|
|
53
53
|
private
|
54
54
|
|
55
55
|
def load_cartridge!(path)
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
56
|
+
if !path.is_a?(String) && !path.is_a?(Symbol)
|
57
|
+
@cartridge = path
|
58
|
+
else
|
59
|
+
elected_path = if path.strip == '-'
|
60
|
+
File.expand_path('../static/cartridges/baseline.yml', __dir__)
|
61
|
+
else
|
62
|
+
Components::Storage.cartridge_path(path)
|
63
|
+
end
|
64
|
+
|
65
|
+
if elected_path.nil?
|
66
|
+
@stream.write("Cartridge file not found: \"#{path}\"\n")
|
67
|
+
raise StandardError, "Cartridge file not found: \"#{path}\""
|
68
|
+
end
|
66
69
|
|
67
|
-
|
70
|
+
@cartridge = YAML.safe_load(File.read(elected_path), permitted_classes: [Symbol])
|
71
|
+
end
|
68
72
|
|
69
73
|
@safe_cartridge = Marshal.load(Marshal.dump(@cartridge))
|
70
74
|
|
data/docker-compose.example.yml
CHANGED
@@ -3,7 +3,7 @@ version: '3.7'
|
|
3
3
|
services:
|
4
4
|
nano-bots:
|
5
5
|
image: ruby:3.2.2-slim-bullseye
|
6
|
-
command: sh -c "apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev lua5.4-dev && gem install nano-bots -v 0.0.
|
6
|
+
command: sh -c "apt-get update && apt-get install -y --no-install-recommends build-essential libffi-dev lua5.4-dev && gem install nano-bots -v 0.0.7 && bash"
|
7
7
|
environment:
|
8
8
|
OPENAI_API_ADDRESS: https://api.openai.com
|
9
9
|
OPENAI_API_ACCESS_TOKEN: your-token
|
data/static/gem.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
module NanoBot
|
4
4
|
GEM = {
|
5
5
|
name: 'nano-bots',
|
6
|
-
version: '0.0.
|
6
|
+
version: '0.0.7',
|
7
7
|
author: 'icebaker',
|
8
8
|
summary: 'Ruby Implementation of Nano Bots: small, AI-powered bots',
|
9
9
|
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.',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nano-bots
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- icebaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: babosa
|