nano-bots 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b15d457541548f43fcc6d1c7cf7724c2e22a6505c0ca82e95681617e70259bd
4
- data.tar.gz: c5b20938128e993273a0759e6c0e5571a90f67fe59d7b43a36967254dab3bf40
3
+ metadata.gz: 11ff93591159cb0d38d3fb4382d697d340a53336f9f1720f8874b67936696809
4
+ data.tar.gz: 961c499113029cb76120ea3293daab069b4b2510e625a13e8a705de5f49423e7
5
5
  SHA512:
6
- metadata.gz: 2915fddd84a82616a2457bb6ef6d2acb6c7e3ad83beb9fb162033326047b123d43ec3c80764e27b6dbf5b0827a5dc2e3ed9781de3d44d787a188e1724043ab4e
7
- data.tar.gz: b9413865e968eddf7f38e506c7ed96760c2734dea25ddcacac504e58a8ed45f0573d8b1a42285fddd5ddacfe0acbf710d9e804af827338bb58e0e1cbc5163bc8
6
+ metadata.gz: 1fc123e4a8accca9d2c2f9e6f2892a84be98587d98ae4f7b1deb0b200331fcc708bb6b8361cf6ea6f4d084482e35cbb113c6019196ce2ec419b505c6d566bdc3
7
+ data.tar.gz: 2a00ff9d10fbdf5dc612a128728dc650ca5f6aff9bec3be30f7ec86357749171d7352c60372d2410d4e586d71eebb52566e168c5c4e9c684bfbcaa7a438e81dd
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nano-bots (1.1.0)
4
+ nano-bots (1.1.1)
5
5
  babosa (~> 2.0)
6
6
  concurrent-ruby (~> 1.2, >= 1.2.2)
7
7
  dotenv (~> 2.8, >= 2.8.1)
data/README.md CHANGED
@@ -30,13 +30,13 @@ https://user-images.githubusercontent.com/113217272/238141567-c58a240c-7b67-4b3b
30
30
  For a system usage:
31
31
 
32
32
  ```sh
33
- gem install nano-bots -v 1.1.0
33
+ gem install nano-bots -v 1.1.1
34
34
  ```
35
35
 
36
36
  To use it in a project, add it to your `Gemfile`:
37
37
 
38
38
  ```ruby
39
- gem 'nano-bots', '~> 1.1.0'
39
+ gem 'nano-bots', '~> 1.1.1'
40
40
  ```
41
41
 
42
42
  ```sh
@@ -86,7 +86,7 @@ Set your provider credentials and choose your desired directory for the cartridg
86
86
  services:
87
87
  nano-bots:
88
88
  image: ruby:3.2.2-slim-bookworm
89
- 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 1.1.0 && bash"
89
+ 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 1.1.1 && bash"
90
90
  environment:
91
91
  OPENAI_API_ADDRESS: https://api.openai.com
92
92
  OPENAI_API_KEY: your-access-token
@@ -488,5 +488,5 @@ gem build nano-bots.gemspec
488
488
 
489
489
  gem signin
490
490
 
491
- gem push nano-bots-1.1.0.gem
491
+ gem push nano-bots-1.1.1.gem
492
492
  ```
data/components/stream.rb CHANGED
@@ -13,7 +13,11 @@ module NanoBot
13
13
  @accumulated = "#{@accumulated.force_encoding('UTF-8')}#{args.first.force_encoding('UTF-8')}"
14
14
  end
15
15
 
16
- @callback.call(@accumulated, args.first, false, args[1])
16
+ if @callback.arity == 3
17
+ @callback.call(@accumulated, args.first, false)
18
+ else
19
+ @callback.call(@accumulated, args.first, false, args[1])
20
+ end
17
21
  end
18
22
  super(args.first)
19
23
  end
@@ -30,7 +34,11 @@ module NanoBot
30
34
  rewind
31
35
 
32
36
  if @callback
33
- @callback.call(@accumulated, nil, true)
37
+ if @callback.arity == 3
38
+ @callback.call(@accumulated, nil, true)
39
+ else
40
+ @callback.call(@accumulated, nil, true, nil)
41
+ end
34
42
  @callback = nil
35
43
  @accumulated = nil
36
44
  end
@@ -2,7 +2,7 @@
2
2
  services:
3
3
  nano-bots:
4
4
  image: ruby:3.2.2-slim-bookworm
5
- 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 1.1.0 && bash"
5
+ 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 1.1.1 && bash"
6
6
  environment:
7
7
  OPENAI_API_ADDRESS: https://api.openai.com
8
8
  OPENAI_API_KEY: your-access-token
data/static/gem.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  module NanoBot
4
4
  GEM = {
5
5
  name: 'nano-bots',
6
- version: '1.1.0',
6
+ version: '1.1.1',
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: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - icebaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-07 00:00:00.000000000 Z
11
+ date: 2023-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: babosa