Class: Llm::Functions::ReportBug

Inherits:
Base
  • Object
show all
Defined in:
lib/llm/functions/report_bug.rb

Instance Method Summary collapse

Methods inherited from Base

#stop_llm_call?

Instance Method Details

#definitionObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/llm/functions/report_bug.rb', line 8

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



28
29
30
31
# File 'lib/llm/functions/report_bug.rb', line 28

def execute_and_generate_message(args)
  puts(args['message'])
  exit 0
end

#function_nameObject



4
5
6
# File 'lib/llm/functions/report_bug.rb', line 4

def function_name
  :report_bug
end