nano-bots 3.0.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,8 @@
2
2
 
3
3
  require 'openai'
4
4
 
5
+ require 'faraday/typhoeus'
6
+
5
7
  require_relative 'base'
6
8
  require_relative '../crypto'
7
9
 
@@ -35,7 +37,9 @@ module NanoBot
35
37
  "#{@credentials[:address].to_s.sub(%r{/$}, '')}/"
36
38
  end
37
39
 
38
- @client = ::OpenAI::Client.new(uri_base:, access_token: @credentials[:'access-token'])
40
+ @client = ::OpenAI::Client.new(uri_base:, access_token: @credentials[:'access-token']) do |faraday|
41
+ faraday.adapter :typhoeus
42
+ end
39
43
  end
40
44
 
41
45
  def evaluate(input, streaming, cartridge, &feedback)
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  services:
3
3
  nano-bots:
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 3.0.1 && bash"
4
+ image: ruby:3.3.3-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 3.2.0 && bash"
6
6
  environment:
7
7
  COHERE_API_KEY: your-api-key
8
8
 
@@ -94,7 +94,7 @@ module NanoBot
94
94
  LANGUAGES = LANGUAGES_MAP.keys.freeze
95
95
 
96
96
  def initialize(...)
97
- super(...)
97
+ super
98
98
  @_nano_bots_blocks = []
99
99
  end
100
100
 
data/nano-bots.gemspec CHANGED
@@ -32,20 +32,24 @@ Gem::Specification.new do |spec|
32
32
  spec.executables = ['nb']
33
33
 
34
34
  spec.add_dependency 'babosa', '~> 2.0'
35
- spec.add_dependency 'concurrent-ruby', '~> 1.2', '>= 1.2.2'
36
- spec.add_dependency 'dotenv', '~> 2.8', '>= 2.8.1'
35
+ spec.add_dependency 'concurrent-ruby', '~> 1.3', '>= 1.3.3'
36
+ spec.add_dependency 'dotenv', '~> 3.1', '>= 3.1.2'
37
37
  spec.add_dependency 'pry', '~> 0.14.2'
38
38
  spec.add_dependency 'rainbow', '~> 3.1', '>= 3.1.1'
39
39
  spec.add_dependency 'rbnacl', '~> 7.1', '>= 7.1.1'
40
40
  spec.add_dependency 'redcarpet', '~> 3.6'
41
- spec.add_dependency 'sweet-moon', '~> 0.0.7'
42
-
43
- spec.add_dependency 'cohere-ai', '~> 1.0', '>= 1.0.2'
44
- spec.add_dependency 'gemini-ai', '~> 3.1', '>= 3.1.3'
45
- spec.add_dependency 'maritaca-ai', '~> 1.0', '>= 1.0.1'
46
- spec.add_dependency 'mistral-ai', '~> 1.1', '>= 1.1.2'
47
- spec.add_dependency 'ollama-ai', '~> 1.0', '>= 1.0.1'
48
- spec.add_dependency 'ruby-openai', '~> 6.3', '>= 6.3.1'
41
+ spec.add_dependency 'sweet-moon', '~> 1.0'
42
+
43
+ spec.add_dependency 'cohere-ai', '~> 1.1'
44
+ spec.add_dependency 'gemini-ai', '~> 4.0'
45
+ spec.add_dependency 'maritaca-ai', '~> 1.2'
46
+ spec.add_dependency 'mistral-ai', '~> 1.2'
47
+ spec.add_dependency 'ollama-ai', '~> 1.2', '>= 1.2.1'
48
+ spec.add_dependency 'ruby-openai', '~> 7.1'
49
+
50
+ spec.add_dependency 'faraday', '~> 2.9', '>= 2.9.2'
51
+ spec.add_dependency 'faraday-typhoeus', '~> 1.1'
52
+ spec.add_dependency 'typhoeus', '~> 1.4', '>= 1.4.1'
49
53
 
50
54
  spec.metadata['rubygems_mfa_required'] = 'true'
51
55
  end
@@ -14,4 +14,4 @@ provider:
14
14
  access-token: ENV/OPENAI_API_KEY
15
15
  settings:
16
16
  user: ENV/NANO_BOTS_END_USER
17
- model: gpt-3.5-turbo-1106
17
+ model: gpt-3.5-turbo