Class: Raif::Agents::ReActStep

Inherits:
Object
  • Object
show all
Defined in:
app/models/raif/agents/re_act_step.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model_response_text:) ⇒ ReActStep

Returns a new instance of ReActStep.

[View source]

8
9
10
# File 'app/models/raif/agents/re_act_step.rb', line 8

def initialize(model_response_text:)
  @model_response_text = model_response_text
end

Instance Attribute Details

#model_response_textObject (readonly)

Returns the value of attribute model_response_text.


6
7
8
# File 'app/models/raif/agents/re_act_step.rb', line 6

def model_response_text
  @model_response_text
end

Instance Method Details

#actionObject

[View source]

20
21
22
# File 'app/models/raif/agents/re_act_step.rb', line 20

def action
  @action ||= extract_tag_content("action")
end

#answerObject

[View source]

16
17
18
# File 'app/models/raif/agents/re_act_step.rb', line 16

def answer
  @answer ||= extract_tag_content("answer")
end

#thoughtObject

[View source]

12
13
14
# File 'app/models/raif/agents/re_act_step.rb', line 12

def thought
  @thought ||= extract_tag_content("thought")
end