Class: Durable::Llm::Providers::Google::GoogleMessage

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

Overview

Represents a message in a Google conversation.

Messages contain text content extracted from parts.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(part) ⇒ GoogleMessage

Returns a new instance of GoogleMessage.



254
255
256
# File 'lib/durable/llm/providers/google.rb', line 254

def initialize(part)
  @content = part&.dig('text') || ''
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



252
253
254
# File 'lib/durable/llm/providers/google.rb', line 252

def content
  @content
end

Instance Method Details

#to_sObject



258
259
260
# File 'lib/durable/llm/providers/google.rb', line 258

def to_s
  @content
end