Class: Mistri::Content::Text
- Inherits:
-
Data
- Object
- Data
- Mistri::Content::Text
- Defined in:
- lib/mistri/content.rb
Overview
signature carries opaque provider metadata that must round-trip, such as
the OpenAI Responses message id and output phase.
Instance Attribute Summary collapse
-
#signature ⇒ Object
readonly
Returns the value of attribute signature.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text:, signature: nil) ⇒ Text
constructor
A new instance of Text.
- #to_h ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(text:, signature: nil) ⇒ Text
Returns a new instance of Text.
20 |
# File 'lib/mistri/content.rb', line 20 def initialize(text:, signature: nil) = super(text: Content.freeze_string(text), signature:) |
Instance Attribute Details
#signature ⇒ Object (readonly)
Returns the value of attribute signature
19 20 21 |
# File 'lib/mistri/content.rb', line 19 def signature @signature end |
#text ⇒ Object (readonly)
Returns the value of attribute text
19 20 21 |
# File 'lib/mistri/content.rb', line 19 def text @text end |
Instance Method Details
#to_h ⇒ Object
24 |
# File 'lib/mistri/content.rb', line 24 def to_h = { type: :text, text:, signature: }.compact |
#type ⇒ Object
22 |
# File 'lib/mistri/content.rb', line 22 def type = :text |