ruby_bots 0.0.22 → 0.0.23

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9cb9f98a4334909eaa93b2c4f0ed5dcb3c92c85b32ecaeafcf17c2f1e8219a70
4
- data.tar.gz: 978d6e24d899760d5c79c585ebbf6ee4bb93086c8e809a2d6befa145a74ddf03
3
+ metadata.gz: f033f968d4ac24541d10ae38913ea8752d1c6a08c538b3bab6716bcd72365e7a
4
+ data.tar.gz: c1f905d49c704475e7c96f0ab8957ac78cf422fc6fdfd38e0b15c0a2e3fe4671
5
5
  SHA512:
6
- metadata.gz: 44a634ac21766cabd85022c83c96d0672b1cbea6fea831932cf954b891cd310741e618b23cd4a0837e053bf4fb1c706fdc28a414ba7af2ccea451c57ad699d47
7
- data.tar.gz: 8bbfe05922e5dd8e3016427e60aee9f10e443c811d6dfc1a57fb555d8b134eedd2f41bde6fe2b446315b0b4cfddd65e76d4b408932445190c042da4e4810a5db
6
+ metadata.gz: b361259f543091c9a252419bcbe9d07a839b4b92249f790d58e8f09c7d421e62225d1e4f704d5dbad2932fb436f3668215c8e4f863550d2802475c00d776b46b
7
+ data.tar.gz: 011546a87f231642929daaf6a6edcd9a483da7961992958f30a0dfa8f402125c843860466c270407986c665d1a0e557a1e21652a543175374991cee1f68741b7
@@ -15,51 +15,52 @@ module RubyBots
15
15
  end
16
16
 
17
17
  def examples
18
- [
19
- <<~EXAMPLE
20
- User: What is the current temperature in the city Julia Roberts was born in?
21
- Thought: I need to know where Julia Roberts was born.
22
- Action: search[Julia Roberts birthplace]
23
- Observation: Smyrna, Georgia
24
- Thought: I need to know the current temperature in Smyrna, Georgia.
25
- Action: search[current temperature Smyrna, Georgia]
26
- Observation: 72 degrees Fahrenheit
27
- Thought: I need to tell the user the current temperature in the city Julia Roberts was born in.
28
- Answer: 72 degrees Fahrenheit
29
- EXAMPLE
30
- ,
31
- <<~EXAMPLE
32
- User: What is the square of the age of Albert Einstein at his death?
33
- Thought: I need to know the age of Albert Einstein at his death.
34
- Action: search[Albert Einstein age at death]
35
- Observation: 76 years old
36
- Thought: I need to know the square of 76.
37
- Action: calculate[76^2]
38
- Observation: 5776
39
- Thought: I need to tell the user the square of the age of Albert Einstein at his death.
40
- Answer: 5776
41
- EXAMPLE
42
- ,
43
- <<~EXAMPLE
44
- User: What is half of the amount of years that have passed since the year the first airplane flew?
45
- Thought: I need to know the year the first airplane flew.
46
- Action: search[first airplane flight year]
47
- Observation: 1903
48
- Thought: I need to know the current year.
49
- Action: search[current year]
50
- Observation: 2023
51
- Thought: I need to know the amount of years that have passed since 1903.
52
- Action: calculate[2023 - 1903]
53
- Observation: 120
54
- Thought: I need to know half of 120.
55
- Action: calculate[120 / 2]
56
- Observation: 60
57
- Thought: I need to tell the user half of the amount of years that have passed since the year the first airplane flew.
58
- Answer: 60
59
- EXAMPLE
60
- ]
18
+ [ EXAMPLE_ONE, EXAMPLE_TWO, EXAMPLE_THREE ]
61
19
  end
62
20
 
21
+
22
+ EXAMPLE_ONE = <<~EXAMPLE
23
+ User: What is the current temperature in the city Julia Roberts was born in?
24
+ Thought: I need to know where Julia Roberts was born.
25
+ Action: search[Julia Roberts birthplace]
26
+ Observation: Smyrna, Georgia
27
+ Thought: I need to know the current temperature in Smyrna, Georgia.
28
+ Action: search[current temperature Smyrna, Georgia]
29
+ Observation: 72 degrees Fahrenheit
30
+ Thought: I need to tell the user the current temperature in the city Julia Roberts was born in.
31
+ Answer: 72 degrees Fahrenheit
32
+ EXAMPLE
33
+
34
+ EXAMPLE_TWO = <<~EXAMPLE
35
+ User: What is the square of the age of Albert Einstein at his death?
36
+ Thought: I need to know the age of Albert Einstein at his death.
37
+ Action: search[Albert Einstein age at death]
38
+ Observation: 76 years old
39
+ Thought: I need to know the square of 76.
40
+ Action: calculate[76^2]
41
+ Observation: 5776
42
+ Thought: I need to tell the user the square of the age of Albert Einstein at his death.
43
+ Answer: 5776
44
+ EXAMPLE
45
+
46
+ EXAMPLE_THREE = <<~EXAMPLE
47
+ User: What is half of the amount of years that have passed since the year the first airplane flew?
48
+ Thought: I need to know the year the first airplane flew.
49
+ Action: search[first airplane flight year]
50
+ Observation: 1903
51
+ Thought: I need to know the current year.
52
+ Action: search[current year]
53
+ Observation: 2023
54
+ Thought: I need to know the amount of years that have passed since 1903.
55
+ Action: calculate[2023 - 1903]
56
+ Observation: 120
57
+ Thought: I need to know half of 120.
58
+ Action: calculate[120 / 2]
59
+ Observation: 60
60
+ Thought: I need to tell the user half of the amount of years that have passed since the year the first airplane flew.
61
+ Answer: 60
62
+ EXAMPLE
63
+
63
64
  def system_instructions
64
65
  <<~PROMPT
65
66
  You are an assistant designed to provide solutions for a user. You are provided with the user's input.
@@ -1,3 +1,3 @@
1
1
  module RubyBots
2
- VERSION = "0.0.22".freeze
2
+ VERSION = "0.0.23".freeze
3
3
  end
data/lib/ruby_bots.rb CHANGED
@@ -30,10 +30,10 @@ module RubyBots
30
30
  class InvalidOutputError < Error; end
31
31
  end
32
32
 
33
- require "ruby_bots/tool"
34
- require "ruby_bots/bot"
35
- require "ruby_bots/tools/openai_tool.rb"
36
- require "ruby_bots/bots/openai_bot.rb"
37
- require "ruby_bots/bots/pipeline_bot.rb"
38
- require "ruby_bots/bots/router_bot.rb"
39
- require "ruby_bots/bots/openai_react_bot.rb"
33
+ require_relative "ruby_bots/tool"
34
+ require_relative "ruby_bots/bot"
35
+ require_relative "ruby_bots/tools/openai_tool.rb"
36
+ require_relative "ruby_bots/bots/openai_bot.rb"
37
+ require_relative "ruby_bots/bots/pipeline_bot.rb"
38
+ require_relative "ruby_bots/bots/router_bot.rb"
39
+ require_relative "ruby_bots/bots/openai_react_bot.rb"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_bots
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.22
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Paulson