Class: Durable::Llm::Providers::Groq::GroqMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/durable/llm/providers/groq.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ GroqMessage

Returns a new instance of GroqMessage.



121
122
123
124
# File 'lib/durable/llm/providers/groq.rb', line 121

def initialize(message)
  @role = message['role']
  @content = message['content']
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



119
120
121
# File 'lib/durable/llm/providers/groq.rb', line 119

def content
  @content
end

#roleObject (readonly)

Returns the value of attribute role.



119
120
121
# File 'lib/durable/llm/providers/groq.rb', line 119

def role
  @role
end

Instance Method Details

#to_sObject



126
127
128
# File 'lib/durable/llm/providers/groq.rb', line 126

def to_s
  @content
end