Class: Durable::Llm::Providers::Together::TogetherMessage

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

Overview

Represents a message in the Together API response.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ TogetherMessage

Initializes a message.

Parameters:

  • message (Hash)

    The message data



250
251
252
253
# File 'lib/durable/llm/providers/together.rb', line 250

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

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



245
246
247
# File 'lib/durable/llm/providers/together.rb', line 245

def content
  @content
end

#roleObject (readonly)

Returns the value of attribute role.



245
246
247
# File 'lib/durable/llm/providers/together.rb', line 245

def role
  @role
end

Instance Method Details

#to_sString

Converts to string.

Returns:

  • (String)

    The content



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

def to_s
  @content
end