Class: Agent::SessionContext::Prompt
- Inherits:
-
Data
- Object
- Data
- Agent::SessionContext::Prompt
- Defined in:
- lib/agent/session_context/prompt.rb
Instance Attribute Summary collapse
-
#at ⇒ Object
readonly
Returns the value of attribute at.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#source_refs ⇒ Object
readonly
Returns the value of attribute source_refs.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(index:, at:, text:, source_refs:) ⇒ Prompt
constructor
A new instance of Prompt.
Constructor Details
#initialize(index:, at:, text:, source_refs:) ⇒ Prompt
Returns a new instance of Prompt.
6 7 8 9 10 11 12 13 |
# File 'lib/agent/session_context/prompt.rb', line 6 def initialize(index:, at:, text:, source_refs:) super( index: normalize_positive_index(index), at: at, text: normalize_string(text, :text), source_refs: ImmutableValue.copy(Array(source_refs)) ) end |
Instance Attribute Details
#at ⇒ Object (readonly)
Returns the value of attribute at
5 6 7 |
# File 'lib/agent/session_context/prompt.rb', line 5 def at @at end |
#index ⇒ Object (readonly)
Returns the value of attribute index
5 6 7 |
# File 'lib/agent/session_context/prompt.rb', line 5 def index @index end |
#source_refs ⇒ Object (readonly)
Returns the value of attribute source_refs
5 6 7 |
# File 'lib/agent/session_context/prompt.rb', line 5 def source_refs @source_refs end |
#text ⇒ Object (readonly)
Returns the value of attribute text
5 6 7 |
# File 'lib/agent/session_context/prompt.rb', line 5 def text @text end |