Class: Agents::ActionExample

Inherits:
Object
  • Object
show all
Defined in:
lib/actions/action_example.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input:, output:) ⇒ ActionExample

Returns a new instance of ActionExample.



4
5
6
7
# File 'lib/actions/action_example.rb', line 4

def initialize(input:, output:)
  @input = input
  @output = output
end

Instance Attribute Details

#inputObject (readonly)

Returns the value of attribute input.



3
4
5
# File 'lib/actions/action_example.rb', line 3

def input
  @input
end

#outputObject (readonly)

Returns the value of attribute output.



3
4
5
# File 'lib/actions/action_example.rb', line 3

def output
  @output
end

Instance Method Details

#for_promptObject



9
10
11
# File 'lib/actions/action_example.rb', line 9

def for_prompt
  "    Input: #{input}\n    Output: #{output}"
end