ruby_bots 0.0.2 → 0.0.3

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: 97bf25557fb288a1416c47c9e3e566e437c04c5d2c19fedab06ae83837e24408
4
- data.tar.gz: 26bb0781e3d5c2580b385539ae041eda38fb6ce2d323df20e80260780df78b88
3
+ metadata.gz: 656073bfe550e5be358a7189a137acd2fab90279f46a1d9c44899dddd022f844
4
+ data.tar.gz: 28bf1c1005c95aed8cb5f319c012a6ea4c54c8c1e2b5d9941af88bc6841eb9e3
5
5
  SHA512:
6
- metadata.gz: 7cefa94ef3b53ea79d46d39fb8256a3d96e96db852f45ae51feed2c58e0826fd2ba536acb43a1c801fdae83de8694be7f30e9e6541c344228d4bda1cac4dcbf7
7
- data.tar.gz: 2b2afd2c55c6878d52a5d9675bbcfc39b90a6df8374482fc06e762c68dec48afd88bf5282a36aa48859e77ec5697b7911e8a755fe5367d29734424225da701b7
6
+ metadata.gz: 3338bbd983626a62f6448ba4631a940932c2639abb00fb4e109ef47b2ad7b5f777371321f94b42f1ee6be510964a951f8ac8d181c6f953023ae2fb34c1ab334c
7
+ data.tar.gz: 1fb67357ceac7f6ceafeb0737a54e138e25350b79fc2aefc08278a9d1b83c4db391e4da669c53a390928cf56289c200ad943a86b8482a6362735857c8e04eb9b
@@ -2,24 +2,25 @@ module RubyBots
2
2
  class OpenAIBot < OpenAITool
3
3
  attr_accessor :tools
4
4
 
5
- DEFAULT_DESCRIPTION = "This bot will use OpenAI to determine the appropriate tool."
6
-
7
- def initialize(name: "OpenAI bot", description: DEFAULT_DESCRIPTION, tools:)
8
- @name = name
9
- @description = description
10
- @tools = tools
11
- end
12
-
13
- def operate(inputs)
14
- params = {
15
- messages: [
16
- { role: :system, content: system_instructions },
17
- { role: :user, content: inputs }
18
- ]
19
- }.merge(default_params)
5
+ DEFAULT_DESCRIPTION = "This bot will use OpenAI to determine the appropriate tool."
6
+
7
+ def initialize(name: "OpenAI bot", description: DEFAULT_DESCRIPTION, tools:)
8
+ @name = name
9
+ @description = description
10
+ @tools = tools
11
+ end
12
+
13
+ def operate(inputs)
14
+ params = {
15
+ messages: [
16
+ { role: :system, content: system_instructions },
17
+ { role: :user, content: inputs }
18
+ ]
19
+ }.merge(default_params)
20
20
 
21
- response = client.chat(parameters: params)
21
+ response = client.chat(parameters: params)
22
22
 
23
- response.dig("choices", 0, "message", "content")
23
+ response.dig("choices", 0, "message", "content")
24
+ end
24
25
  end
25
26
  end
@@ -1,3 +1,3 @@
1
1
  module RubyBots
2
- VERSION = "0.0.2".freeze
2
+ VERSION = "0.0.3".freeze
3
3
  end
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.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Paulson