func_bot 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 93f6e105ec4bd586c7570f0400d9d25075c2d0504e81d2db43392196965d03f9
4
+ data.tar.gz: 0dc35e731b9f25a08ac0a664630a804c67c3019fa8e406df8445d707c7b154bc
5
+ SHA512:
6
+ metadata.gz: bde8ef39474d86f7cf309ad37afb5c409e6dc87da0447ceec1252b1676360aa035418c66906b5e7a65fbe7e8906b73ddac3f6e7f4b7bfbe5d37e54917f905130
7
+ data.tar.gz: edefb12cb6eb69ff791c8db07703418e5bfe17f2a5284b8bfec8d457b1bb3c3d333c0c061f099a1d7dc285f9fec2c8c19d2193848f042a838515dd04a492be1c
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2023 lbp
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,97 @@
1
+ # FuncBot
2
+
3
+ FuncBot is a Rails gem built on top of the [ruby-openai](https://github.com/alexrudall/ruby-openai) gem that allows you to easily create chatbots that can answer questions by calling on functions that you define.
4
+
5
+ ## Usage
6
+
7
+ - Generate a new function
8
+
9
+ ```bash
10
+ rails g func_bot:function <function_name>
11
+ ```
12
+
13
+ - Update the function in `lib/func_bot/functions/<function_name>.rb`
14
+
15
+ - A function can be as simple or as complex as you need it to be. Your bot will process the results and express them to the user.
16
+ - All functions must have an `execute` method.
17
+ - Here's a sample function that returns the current weather for the given location.
18
+
19
+ ```ruby
20
+ module FuncBot
21
+ module Functions
22
+ class WeatherFunction < BaseFunction
23
+ def execute
24
+ weather_info = {
25
+ location: parsed_response["location"],
26
+ temperature: 98,
27
+ forecast: ["sunny", "windy"]
28
+ }
29
+
30
+ JSON.dump(weather_info)
31
+ end
32
+ end
33
+ end
34
+ end
35
+ ```
36
+
37
+ - The `parsed_response` and `response` methods are available to all functions.
38
+ - `parsed_response` is a hash that contains the response relevant to your function from OpenAI.
39
+ - `response` is the raw response from OpenAI.
40
+
41
+ - Update your new function in the list of functions in `lib/func_bot/functions/list.yml`.
42
+ - This list of functions will be available to the bot with every request.
43
+ - Adding good descriptions to the functions will help the bot infer when to use which function.
44
+ - If the user asks a question that is not related to a function in your list, the bot will just ask ChatGPT.
45
+
46
+ `bin/rails c`
47
+
48
+ ```ruby
49
+ irb(main):001:0> bot = FuncBot::Bot.new
50
+ => #<FuncBot::Bot:0x0000000105ecd8e8 @history=#<FuncBot::Bots::History:0x0000000105ecd848 @history=[]>>
51
+ irb(main):002:0> bot.ask "What's the weather like in Miami, FL?"
52
+ => "The current weather in Miami, FL is sunny and windy with a temperature of 98 degrees."
53
+ irb(main):003:0>
54
+ ```
55
+
56
+ ## Installation
57
+
58
+ Add this line to your application's Gemfile:
59
+
60
+ ```ruby
61
+ gem "func_bot"
62
+ ```
63
+
64
+ And then execute:
65
+
66
+ ```bash
67
+ $ bundle
68
+ ```
69
+
70
+ Or install it yourself as:
71
+
72
+ ```bash
73
+ $ gem install func_bot
74
+ ```
75
+
76
+ ## Setup
77
+
78
+ ```bash
79
+ rails g func_bot:install
80
+
81
+ ```
82
+
83
+ ## Testing
84
+
85
+ ```bash
86
+ cd spec/dummy
87
+ bin/setup
88
+ bundle exec rspec
89
+ ```
90
+
91
+ ## Contributing
92
+
93
+ Contribution directions go here.
94
+
95
+ ## License
96
+
97
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ require "bundler/setup"
2
+
3
+ APP_RAKEFILE = File.expand_path("spec/dummy/Rakefile", __dir__)
4
+ load "rails/tasks/engine.rake"
5
+
6
+ load "rails/tasks/statistics.rake"
7
+
8
+ require "bundler/gem_tasks"
@@ -0,0 +1 @@
1
+ //= link_directory ../stylesheets/func_bot .css
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,4 @@
1
+ module FuncBot
2
+ class ApplicationController < ActionController::Base
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module FuncBot
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module FuncBot
2
+ class ApplicationJob < ActiveJob::Base
3
+ end
4
+ end
@@ -0,0 +1,6 @@
1
+ module FuncBot
2
+ class ApplicationMailer < ActionMailer::Base
3
+ default from: "from@example.com"
4
+ layout "mailer"
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module FuncBot
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
+ end
@@ -0,0 +1,12 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>FuncBot</title>
5
+ <%= csrf_meta_tags %>
6
+ <%= csp_meta_tag %>
7
+ <%= stylesheet_link_tag "func_bot/application", media: "all" %>
8
+ </head>
9
+ <body>
10
+ <%= yield %>
11
+ </body>
12
+ </html>
@@ -0,0 +1,3 @@
1
+ OpenAI.configure do |config|
2
+ config.access_token = Rails.application.credentials.dig(:openai, :api_key)
3
+ end
data/config/routes.rb ADDED
@@ -0,0 +1,2 @@
1
+ FuncBot::Engine.routes.draw do
2
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FuncBot
4
+ class Bot
5
+ attr_accessor :role, :prompt
6
+
7
+ delegate :history, to: :@history
8
+
9
+ def initialize
10
+ @history = Bots::History.new
11
+ end
12
+
13
+ def ask(prompt)
14
+ @prompt = prompt
15
+ @role = "user"
16
+ handle_response(call_openai)
17
+ end
18
+
19
+ private
20
+
21
+ def call_openai
22
+ Bots::Client.call(chat_history)
23
+ end
24
+
25
+ def handle_response(response)
26
+ if function_call?(response)
27
+ Handlers::FunctionHandler.call(response, history)
28
+ else
29
+ Handlers::BotHandler.call(response, history)
30
+ end
31
+ end
32
+
33
+ def function_call?(response)
34
+ response.dig("choices", 0, "message", "function_call").present?
35
+ end
36
+
37
+ def chat_history
38
+ @history.push_prompt(role, prompt)
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FuncBot
4
+ module Bots
5
+ class Client
6
+ def self.call(messages)
7
+ client.chat(
8
+ parameters: {
9
+ model: "gpt-3.5-turbo-0613",
10
+ messages: messages,
11
+ temperature: 0.7,
12
+ functions: FuncBot::Functions::List.call
13
+ }
14
+ )
15
+ end
16
+
17
+ def self.client
18
+ @client ||= OpenAI::Client.new
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,14 @@
1
+ module FuncBot
2
+ module Bots
3
+ class History
4
+ attr_accessor :history
5
+ def initialize
6
+ @history = []
7
+ end
8
+
9
+ def push_prompt(role, prompt)
10
+ @history << Message.new(role, prompt).data
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,21 @@
1
+ module FuncBot
2
+ module Bots
3
+ class Message
4
+ attr_accessor :role, :prompt, :name
5
+
6
+ def initialize(role, prompt, name = nil)
7
+ @role = role
8
+ @prompt = prompt
9
+ @name = name
10
+ end
11
+
12
+ def data
13
+ if name.nil?
14
+ {role: role, content: prompt}
15
+ else
16
+ {role: role, content: prompt, name: name}
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,5 @@
1
+ module FuncBot
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace FuncBot
4
+ end
5
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FuncBot
4
+ module Functions
5
+ class BaseFunction
6
+ attr_reader :response
7
+
8
+ def initialize(response)
9
+ @response = response
10
+ end
11
+
12
+ def parsed_response
13
+ JSON.parse(response.dig("choices", 0, "message", "function_call", "arguments"))
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FuncBot
4
+ module Functions
5
+ class List
6
+ def self.call
7
+ if File.exist?(Rails.root.join("lib", "func_bot", "functions", "list.yml"))
8
+ YAML.load_file(Rails.root.join("lib", "func_bot", "functions", "list.yml"))["functions"]
9
+ else
10
+ raise "lib/func_bot/functions/list.yml file not found. Please create it by running rails func_bot:install."
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FuncBot
4
+ module Handlers
5
+ class BotHandler
6
+ class << self
7
+ def call(response, history)
8
+ history << Bots::Message.new("assistant", dig_for_content(response)).data
9
+ dig_for_content(response)
10
+ end
11
+
12
+ private
13
+
14
+ def dig_for_content(response)
15
+ response.dig("choices", 0, "message", "content")
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FuncBot
4
+ module Handlers
5
+ class FunctionHandler
6
+ attr_accessor :prompt, :history
7
+
8
+ class << self
9
+ def call(response, history)
10
+ @function_name = nil
11
+ @history = history
12
+ function_return = constantize_function(response).new(response).execute
13
+ response = respond_to(function_return)
14
+ history << Bots::Message.new("assistant", dig_for_content(response)).data
15
+ dig_for_content(response)
16
+ end
17
+
18
+ def constantize_function(response)
19
+ "FuncBot::Functions::#{function_name(response)}".constantize
20
+ end
21
+
22
+ def function_name(response = {})
23
+ @function_name ||= response.dig("choices", 0, "message", "function_call", "name")
24
+ end
25
+
26
+ def dig_for_content(response)
27
+ response.dig("choices", 0, "message", "content")
28
+ end
29
+
30
+ def respond_to(prompt)
31
+ @prompt = prompt
32
+ Bots::Client.call(messages)
33
+ end
34
+
35
+ def messages
36
+ @history << Bots::Message.new("function", @prompt, function_name).data
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FuncBot
4
+ VERSION = "0.1.0"
5
+ end
data/lib/func_bot.rb ADDED
@@ -0,0 +1,16 @@
1
+ require "openai"
2
+
3
+ require "func_bot/version"
4
+ require "func_bot/engine"
5
+
6
+ require_relative "func_bot/bot"
7
+ require_relative "func_bot/bots/client"
8
+ require_relative "func_bot/bots/history"
9
+ require_relative "func_bot/bots/message"
10
+ require_relative "func_bot/functions/base_function"
11
+ require_relative "func_bot/functions/list"
12
+ require_relative "func_bot/handlers/bot_handler"
13
+ require_relative "func_bot/handlers/function_handler"
14
+
15
+ module FuncBot
16
+ end
@@ -0,0 +1,36 @@
1
+ module FuncBot
2
+ class FunctionGenerator < Rails::Generators::NamedBase
3
+ source_root File.expand_path("templates", __dir__)
4
+
5
+ def generate_function
6
+ template "function.rb", "lib/func_bot/functions/#{file_name}_function.rb"
7
+ end
8
+
9
+ def append_to_functions_list
10
+ yml = YAML.load_file(yml_file)
11
+ yml["functions"] << function_template
12
+ File.write(yml_file, yml.to_yaml.gsub("---\n", ""))
13
+ end
14
+
15
+ private
16
+
17
+ def yml_file
18
+ Rails.root.join("lib", "func_bot", "functions", "list.yml")
19
+ end
20
+
21
+ def function_template
22
+ {name: "#{class_name}Function",
23
+ description: "TODO: Write a description for this function.",
24
+ parameters: {
25
+ type: "TODO: choose from string, integer, boolean, object, etc.",
26
+ properties: {
27
+ location: {
28
+ type: "TODO: Write a type for this parameter. e.g. string, integer, etc.",
29
+ description: "TODO: Write a description for this parameter."
30
+ }
31
+ },
32
+ required: ["TODO: list the required parameters here"]
33
+ }}
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,14 @@
1
+ module FuncBot
2
+ class InstallGenerator < Rails::Generators::NamedBase
3
+ source_root File.expand_path("templates", __dir__)
4
+
5
+ def move_files_to_lib
6
+ copy_file "openai.rb", "config/initializers/openai.rb"
7
+ copy_file "list.yml", "lib/func_bot/functions/list.yml"
8
+ copy_file "weather_function.rb", "lib/func_bot/functions/weather_function.rb"
9
+ application do
10
+ "config.autoload_paths << Rails.root.join('lib')"
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,11 @@
1
+ module FuncBot
2
+ module Functions
3
+ class <%= class_name %>Function < BaseFunction
4
+ def execute
5
+ # Add your function logic here.
6
+ # eg. data = {some: "data"}
7
+ # JSON.dump(data)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ functions:
2
+ - name: WeatherFunction
3
+ description: Get the current weather forecast for a given location.
4
+ parameters:
5
+ type: object
6
+ properties:
7
+ location:
8
+ type: string
9
+ description: The city and state eg. 'Miami, FL'
10
+ required:
11
+ - location
@@ -0,0 +1,3 @@
1
+ OpenAI.configure do |config|
2
+ config.access_token = Rails.application.credentials.dig(:openai, :api_key)
3
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This function is called when a user asks for the weather.
4
+ # It mocks a call to the weather API and returns the current weather for the requested location.
5
+
6
+ module FuncBot
7
+ module Functions
8
+ class WeatherFunction < BaseFunction
9
+ def execute
10
+ weather_info = {
11
+ location: parsed_response["location"],
12
+ temperature: 98,
13
+ forecast: ["sunny", "windy"]
14
+ }
15
+
16
+ JSON.dump(weather_info)
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,10 @@
1
+ namespace :func_bot do
2
+ desc "Generate function files"
3
+ task install: :environment do
4
+ command = "rails g func_bot:install setup"
5
+ system(command)
6
+ puts "Your setup was successful!"
7
+ puts "You can now run `rails g func_bot:function <function_name>` to generate a new function."
8
+ puts "Please update the function list file at lib/func_bot/functions/list.yml with the functions you want to include."
9
+ end
10
+ end
metadata ADDED
@@ -0,0 +1,259 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: func_bot
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - lbp
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-06-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 7.0.5
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 7.0.5
27
+ - !ruby/object:Gem::Dependency
28
+ name: ruby-openai
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: vcr
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: webmock
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: standard
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: byebug
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rspec-rails
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: factory_bot_rails
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: faker
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: shoulda-matchers
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: coderay
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: generator_spec
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ description: Extensible AI FuncBot with Function calls.
196
+ email:
197
+ - 43428385+leopolicastro@users.noreply.github.com
198
+ executables: []
199
+ extensions: []
200
+ extra_rdoc_files: []
201
+ files:
202
+ - MIT-LICENSE
203
+ - README.md
204
+ - Rakefile
205
+ - app/assets/config/func_bot_manifest.js
206
+ - app/assets/stylesheets/func_bot/application.css
207
+ - app/controllers/func_bot/application_controller.rb
208
+ - app/helpers/func_bot/application_helper.rb
209
+ - app/jobs/func_bot/application_job.rb
210
+ - app/mailers/func_bot/application_mailer.rb
211
+ - app/models/func_bot/application_record.rb
212
+ - app/views/layouts/func_bot/application.html.erb
213
+ - config/initializers/openai.rb
214
+ - config/routes.rb
215
+ - lib/func_bot.rb
216
+ - lib/func_bot/bot.rb
217
+ - lib/func_bot/bots/client.rb
218
+ - lib/func_bot/bots/history.rb
219
+ - lib/func_bot/bots/message.rb
220
+ - lib/func_bot/engine.rb
221
+ - lib/func_bot/functions/base_function.rb
222
+ - lib/func_bot/functions/list.rb
223
+ - lib/func_bot/handlers/bot_handler.rb
224
+ - lib/func_bot/handlers/function_handler.rb
225
+ - lib/func_bot/version.rb
226
+ - lib/generators/func_bot/function_generator.rb
227
+ - lib/generators/func_bot/install_generator.rb
228
+ - lib/generators/func_bot/templates/function.rb.tt
229
+ - lib/generators/func_bot/templates/list.yml
230
+ - lib/generators/func_bot/templates/openai.rb
231
+ - lib/generators/func_bot/templates/weather_function.rb
232
+ - lib/tasks/func_bot_tasks.rake
233
+ homepage: https://github.com/leopolicastro/func_bot
234
+ licenses:
235
+ - MIT
236
+ metadata:
237
+ homepage_uri: https://github.com/leopolicastro/func_bot
238
+ source_code_uri: https://github.com/leopolicastro/func_bot
239
+ changelog_uri: https://github.com/leopolicastro/func_bot/blob/master/CHANGELOG.md
240
+ post_install_message:
241
+ rdoc_options: []
242
+ require_paths:
243
+ - lib
244
+ required_ruby_version: !ruby/object:Gem::Requirement
245
+ requirements:
246
+ - - ">="
247
+ - !ruby/object:Gem::Version
248
+ version: '0'
249
+ required_rubygems_version: !ruby/object:Gem::Requirement
250
+ requirements:
251
+ - - ">="
252
+ - !ruby/object:Gem::Version
253
+ version: '0'
254
+ requirements: []
255
+ rubygems_version: 3.4.13
256
+ signing_key:
257
+ specification_version: 4
258
+ summary: Extensible AI FuncBot with Function calls.
259
+ test_files: []