boxcars 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: 4e5d528b00df4b8dec38f01fb5452f835c4ceb74b5a6ccda720cfedb4f6890ff
4
+ data.tar.gz: 1560138d2ff1214097ae219afe660eea36a41d157f6059221d41326b5e7019f2
5
+ SHA512:
6
+ metadata.gz: 105433bf91880203ded6155ceb05fe53dd5da63cbc7dfd24d2ea5f28f2fcc8af0d2cd8ab740ba3a49e5fde43f5edf2a6b01548ab6849d28ecdfbc7bba7736d55
7
+ data.tar.gz: 7f933f60e42a5b4da4638331489e4b3778578b5bf4b63072b7625bdb4896f46c5b441a6009db93f41e135323e5c752e35cf0e6ff9aa72350dcff9201bcbe697d
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,154 @@
1
+ require:
2
+ - rubocop-rspec
3
+ - rubocop-rake
4
+
5
+ AllCops:
6
+ Exclude:
7
+ - 'bin/{rails,rake}'
8
+ - 'node_modules/**/*'
9
+ - 'bin/**/*/'
10
+ - 'vendor/**/*'
11
+
12
+ NewCops: enable
13
+
14
+ Style/ClassAndModuleChildren:
15
+ Enabled: false
16
+
17
+ Style/StringLiterals:
18
+ Enabled: false
19
+
20
+ Style/EmptyMethod:
21
+ EnforcedStyle: expanded
22
+
23
+ Style/Documentation:
24
+ Enabled: false
25
+
26
+ Style/NumericLiterals:
27
+ Enabled: false
28
+
29
+ Style/WordArray:
30
+ Enabled: false
31
+
32
+ Style/SymbolArray:
33
+ Enabled: false
34
+
35
+ Style/FrozenStringLiteralComment:
36
+ Enabled: false
37
+
38
+ Style/StringLiteralsInInterpolation:
39
+ Enabled: false
40
+
41
+ Style/ClassVars:
42
+ Enabled: false
43
+
44
+ Layout/MultilineMethodCallBraceLayout:
45
+ Enabled: false
46
+
47
+ Layout/DotPosition:
48
+ Enabled: false
49
+
50
+ Style/TrailingCommaInArrayLiteral:
51
+ Enabled: false
52
+
53
+ Layout/LineLength:
54
+ Max: 130
55
+ Enabled: true
56
+ Exclude:
57
+ - 'db/**/*'
58
+ - 'spec/**/*'
59
+
60
+ Metrics/AbcSize:
61
+ Enabled: false
62
+
63
+ Metrics/BlockLength:
64
+ Exclude:
65
+ - 'Guardfile'
66
+ - '**/*.rake'
67
+ - 'db/**/*'
68
+ - 'spec/**/*'
69
+
70
+ Metrics/MethodLength:
71
+ Max: 35
72
+ Exclude:
73
+ - 'spec/**/*'
74
+
75
+ Metrics/CyclomaticComplexity:
76
+ Enabled: false
77
+
78
+ Metrics/ClassLength:
79
+ Max: 200
80
+
81
+ Style/FloatDivision:
82
+ Enabled: false
83
+
84
+ Metrics/ParameterLists:
85
+ Max: 6
86
+
87
+ Naming/MemoizedInstanceVariableName:
88
+ Enabled: false
89
+
90
+ Naming/AccessorMethodName:
91
+ Enabled: false
92
+
93
+ Metrics/PerceivedComplexity:
94
+ Max: 10
95
+
96
+ Style/RescueStandardError:
97
+ Enabled: false
98
+
99
+ Layout/FirstHashElementIndentation:
100
+ Enabled: false
101
+
102
+ Style/HashTransformKeys:
103
+ Enabled: true
104
+
105
+ Style/HashTransformValues:
106
+ Enabled: true
107
+
108
+ Style/RedundantAssignment:
109
+ Enabled: true
110
+
111
+ Style/RedundantFetchBlock:
112
+ Enabled: true
113
+
114
+ Layout/SpaceAroundMethodCallOperator:
115
+ Enabled: true
116
+
117
+ Layout/EmptyLinesAroundAttributeAccessor:
118
+ Enabled: true
119
+
120
+ Lint/DeprecatedOpenSSLConstant:
121
+ Enabled: true
122
+
123
+ Lint/MixedRegexpCaptureTypes:
124
+ Enabled: true
125
+
126
+ Lint/RaiseException:
127
+ Enabled: true
128
+
129
+ Lint/StructNewOverride:
130
+ Enabled: true
131
+
132
+ Style/AccessorGrouping:
133
+ Enabled: true
134
+
135
+ Style/BisectedAttrAccessor:
136
+ Enabled: true
137
+
138
+ Style/ExponentialNotation:
139
+ Enabled: true
140
+
141
+ Style/HashEachMethods:
142
+ Enabled: true
143
+
144
+ Style/RedundantRegexpCharacterClass:
145
+ Enabled: true
146
+
147
+ Style/RedundantRegexpEscape:
148
+ Enabled: true
149
+
150
+ Style/SlicingWithRange:
151
+ Enabled: false
152
+
153
+ Bundler/OrderedGems:
154
+ Enabled: false
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2023-02-07
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at fxs@fsullivans.net. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in boxcars.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.2"
11
+
12
+ gem "rubocop", "~> 1.21"
13
+
14
+ gem "vcr", "~> 6.1.0"
15
+
16
+ gem "webmock", "~> 3.18.1"
17
+
18
+ gem "rubocop-rake", "~> 0.6.0"
19
+
20
+ gem "rubocop-rspec", "~> 2.17"
21
+
22
+ gem "sqlite3", "~> 1.6"
23
+
24
+ gem "activerecord", "~> 7.0"
data/Gemfile.lock ADDED
@@ -0,0 +1,119 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ boxcars (0.1.0)
5
+ google_search_results (~> 2.2)
6
+ ruby-openai (~> 2.2)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activemodel (7.0.4.2)
12
+ activesupport (= 7.0.4.2)
13
+ activerecord (7.0.4.2)
14
+ activemodel (= 7.0.4.2)
15
+ activesupport (= 7.0.4.2)
16
+ activesupport (7.0.4.2)
17
+ concurrent-ruby (~> 1.0, >= 1.0.2)
18
+ i18n (>= 1.6, < 2)
19
+ minitest (>= 5.1)
20
+ tzinfo (~> 2.0)
21
+ addressable (2.8.1)
22
+ public_suffix (>= 2.0.2, < 6.0)
23
+ ast (2.4.2)
24
+ concurrent-ruby (1.2.0)
25
+ crack (0.4.5)
26
+ rexml
27
+ debug (1.7.0)
28
+ irb (>= 1.5.0)
29
+ reline (>= 0.3.1)
30
+ diff-lcs (1.5.0)
31
+ dotenv (2.8.1)
32
+ google_search_results (2.2.0)
33
+ hashdiff (1.0.1)
34
+ httparty (0.20.0)
35
+ mime-types (~> 3.0)
36
+ multi_xml (>= 0.5.2)
37
+ i18n (1.12.0)
38
+ concurrent-ruby (~> 1.0)
39
+ io-console (0.5.11)
40
+ irb (1.5.1)
41
+ reline (>= 0.3.0)
42
+ json (2.6.2)
43
+ mime-types (3.4.1)
44
+ mime-types-data (~> 3.2015)
45
+ mime-types-data (3.2022.0105)
46
+ minitest (5.17.0)
47
+ multi_xml (0.6.0)
48
+ parallel (1.22.1)
49
+ parser (3.2.0.0)
50
+ ast (~> 2.4.1)
51
+ public_suffix (5.0.0)
52
+ rainbow (3.1.1)
53
+ rake (13.0.6)
54
+ regexp_parser (2.6.0)
55
+ reline (0.3.1)
56
+ io-console (~> 0.5)
57
+ rexml (3.2.5)
58
+ rspec (3.11.0)
59
+ rspec-core (~> 3.11.0)
60
+ rspec-expectations (~> 3.11.0)
61
+ rspec-mocks (~> 3.11.0)
62
+ rspec-core (3.11.0)
63
+ rspec-support (~> 3.11.0)
64
+ rspec-expectations (3.11.0)
65
+ diff-lcs (>= 1.2.0, < 2.0)
66
+ rspec-support (~> 3.11.0)
67
+ rspec-mocks (3.11.1)
68
+ diff-lcs (>= 1.2.0, < 2.0)
69
+ rspec-support (~> 3.11.0)
70
+ rspec-support (3.11.0)
71
+ rubocop (1.38.0)
72
+ json (~> 2.3)
73
+ parallel (~> 1.10)
74
+ parser (>= 3.1.2.1)
75
+ rainbow (>= 2.2.2, < 4.0)
76
+ regexp_parser (>= 1.8, < 3.0)
77
+ rexml (>= 3.2.5, < 4.0)
78
+ rubocop-ast (>= 1.23.0, < 2.0)
79
+ ruby-progressbar (~> 1.7)
80
+ unicode-display_width (>= 1.4.0, < 3.0)
81
+ rubocop-ast (1.23.0)
82
+ parser (>= 3.1.1.0)
83
+ rubocop-rake (0.6.0)
84
+ rubocop (~> 1.0)
85
+ rubocop-rspec (2.17.1)
86
+ rubocop (~> 1.33)
87
+ ruby-openai (2.2.0)
88
+ dotenv (>= 2.7.6, < 2.9.0)
89
+ httparty (>= 0.18.1, < 0.21.0)
90
+ ruby-progressbar (1.11.0)
91
+ sqlite3 (1.6.0-x86_64-darwin)
92
+ tzinfo (2.0.6)
93
+ concurrent-ruby (~> 1.0)
94
+ unicode-display_width (2.3.0)
95
+ vcr (6.1.0)
96
+ webmock (3.18.1)
97
+ addressable (>= 2.8.0)
98
+ crack (>= 0.3.2)
99
+ hashdiff (>= 0.4.0, < 2.0.0)
100
+
101
+ PLATFORMS
102
+ x86_64-darwin-21
103
+
104
+ DEPENDENCIES
105
+ activerecord (~> 7.0)
106
+ boxcars!
107
+ debug (~> 1.1)
108
+ dotenv (~> 2.8)
109
+ rake (~> 13.0)
110
+ rspec (~> 3.2)
111
+ rubocop (~> 1.21)
112
+ rubocop-rake (~> 0.6.0)
113
+ rubocop-rspec (~> 2.17)
114
+ sqlite3 (~> 1.6)
115
+ vcr (~> 6.1.0)
116
+ webmock (~> 3.18.1)
117
+
118
+ BUNDLED WITH
119
+ 2.2.32
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Tabrez Syed and Francis Sullivan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # Boxcars
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/boxcars`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'boxcars'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install boxcars
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/boxcars. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/boxcars/blob/main/CODE_OF_CONDUCT.md).
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
+
41
+ ## Code of Conduct
42
+
43
+ Everyone interacting in the Boxcars project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/boxcars/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "boxcars"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,102 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Boxcars is a framework for running a series of tools to get an answer to a question.
4
+ module Boxcars
5
+ # A Boxcar that interprets a prompt and executes ruby code to do math
6
+ class Calculator < EngineBoxcar
7
+ CALCDESC = "useful for when you need to answer questions about math"
8
+ attr_accessor :input_key
9
+
10
+ # @param prompt [Boxcars::Prompt] The prompt to use for this boxcar.
11
+ # @param name [String] The name of the boxcar. Defaults to classname.
12
+ # @param description [String] A description of the boxcar.
13
+ # @param engine [Boxcars::Engine] The engine to user for this boxcar. Can be inherited from a conductor if nil.
14
+ # @param input_key [Symbol] The key to use for the input. Defaults to :question.
15
+ # @param output_key [Symbol] The key to use for the output. Defaults to :answer.
16
+ def initialize(engine: nil, prompt: nil, input_key: :question, output_key: :answer, **kwargs)
17
+ # def initialize(engine:, prompt: my_prompt, input_key: :question, output_key: :answer, **kwargs)
18
+ @input_key = input_key
19
+ the_prompt = prompt || my_prompt
20
+ super(name: kwargs[:name] || "Calculator",
21
+ description: kwargs[:description] || CALCDESC,
22
+ engine: engine,
23
+ prompt: the_prompt,
24
+ output_key: output_key)
25
+ end
26
+
27
+ def input_keys
28
+ [input_key]
29
+ end
30
+
31
+ def output_keys
32
+ [output_key]
33
+ end
34
+
35
+ def call(inputs:)
36
+ t = predict(question: inputs[input_key], stop: ["```output"]).strip
37
+ answer = get_answer(t)
38
+ puts answer.colorize(:magenta)
39
+ { output_key => answer }
40
+ end
41
+
42
+ private
43
+
44
+ def get_embedded_ruby_answer(text)
45
+ code = text[8..-4].split("```").first.strip
46
+ ruby_executor = Boxcars::RubyREPL.new
47
+ ruby_executor.call(code: code).strip
48
+ end
49
+
50
+ def get_answer(text)
51
+ case text
52
+ when /^```ruby/
53
+ get_embedded_ruby_answer(text)
54
+ when /^Answer:/
55
+ text
56
+ else
57
+ raise Boxcars::Error "Unknown format from engine: #{text}"
58
+ end
59
+ end
60
+
61
+ TEMPLATE = <<~IPT
62
+ You are GPT-3, and you can't do math.
63
+ You can do basic math, and your memorization abilities are impressive, but you can't do any complex calculations that a human could not do in their head. You also have an annoying tendency to just make up highly specific, but wrong, answers.
64
+ So we hooked you up to a Ruby 3 kernel, and now you can execute ruby code. If anyone gives you a hard math problem, just use this format and we’ll take care of the rest:
65
+
66
+ Question: ${{Question with hard calculation.}}
67
+ ```ruby
68
+ ${{Code that prints what you need to know}}
69
+ ```
70
+ ```output
71
+ ${{Output of your code}}
72
+ ```
73
+ Answer: ${{Answer}}
74
+
75
+ Otherwise, use this simpler format:
76
+
77
+ Question: ${{Question without hard calculation}}
78
+ Answer: ${{Answer}}
79
+
80
+ Begin.
81
+
82
+ Question: What is 37593 * 67?
83
+ ```ruby
84
+ puts(37593 * 67)
85
+ ```
86
+ ```output
87
+ 2518731
88
+ ```
89
+ Answer: 2518731
90
+
91
+ Question: what is 2518731 + 0?
92
+ Answer: 2518731
93
+
94
+ Question: %<question>s
95
+ IPT
96
+
97
+ # The prompt to use for the engine.
98
+ def my_prompt
99
+ @my_prompt ||= Prompt.new(input_variables: [:question], template: TEMPLATE)
100
+ end
101
+ end
102
+ end