Class: Durable::Llm::Providers::Perplexity::PerplexityMessage
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Perplexity::PerplexityMessage
- Defined in:
- lib/durable/llm/providers/perplexity.rb
Overview
Represents a message in a Perplexity response.
Contains the role and content of the message.
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
Instance Method Summary collapse
-
#initialize(message) ⇒ PerplexityMessage
constructor
A new instance of PerplexityMessage.
- #to_s ⇒ Object
Constructor Details
#initialize(message) ⇒ PerplexityMessage
Returns a new instance of PerplexityMessage.
196 197 198 199 |
# File 'lib/durable/llm/providers/perplexity.rb', line 196 def initialize() @role = ['role'] @content = ['content'] end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
194 195 196 |
# File 'lib/durable/llm/providers/perplexity.rb', line 194 def content @content end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
194 195 196 |
# File 'lib/durable/llm/providers/perplexity.rb', line 194 def role @role end |
Instance Method Details
#to_s ⇒ Object
201 202 203 |
# File 'lib/durable/llm/providers/perplexity.rb', line 201 def to_s @content end |