Class: Llm::Functions::RecordLgtm
- Defined in:
- lib/llm/functions/record_lgtm.rb
Instance Method Summary collapse
- #definition ⇒ Object
- #execute_and_generate_message(args) ⇒ Object
- #function_name ⇒ Object
-
#initialize ⇒ RecordLgtm
constructor
A new instance of RecordLgtm.
- #lgtm? ⇒ Boolean
- #stop_llm_call? ⇒ Boolean
Constructor Details
#initialize ⇒ RecordLgtm
Returns a new instance of RecordLgtm.
8 9 10 |
# File 'lib/llm/functions/record_lgtm.rb', line 8 def initialize @lgtm = false end |
Instance Method Details
#definition ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/llm/functions/record_lgtm.rb', line 21 def definition return @definition unless @definition.nil? @definition = { name: self.function_name, description: I18n.t("ghostest.functions.#{self.function_name}.description"), parameters: { type: :object, properties: { message: { type: :string, description: I18n.t("ghostest.functions.#{self.function_name}.parameters.message"), }, }, required: [:message], }, } @definition end |
#execute_and_generate_message(args) ⇒ Object
41 42 43 44 45 |
# File 'lib/llm/functions/record_lgtm.rb', line 41 def (args) @lgtm = true { message: args[:message] } end |
#function_name ⇒ Object
4 5 6 |
# File 'lib/llm/functions/record_lgtm.rb', line 4 def function_name :record_lgtm end |
#lgtm? ⇒ Boolean
17 18 19 |
# File 'lib/llm/functions/record_lgtm.rb', line 17 def lgtm? !!@lgtm end |
#stop_llm_call? ⇒ Boolean
12 13 14 15 |
# File 'lib/llm/functions/record_lgtm.rb', line 12 def stop_llm_call? # stop always true end |