Class: RubyLLM::Content::Raw

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_llm/content.rb

Overview

Represents provider-specific payloads that should bypass RubyLLM formatting.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Raw

Returns a new instance of Raw.

Raises:

  • (ArgumentError)


62
63
64
65
66
# File 'lib/ruby_llm/content.rb', line 62

def initialize(value)
  raise ArgumentError, 'Raw content payload cannot be nil' if value.nil?

  @value = value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



60
61
62
# File 'lib/ruby_llm/content.rb', line 60

def value
  @value
end

Instance Method Details

#formatObject



68
69
70
# File 'lib/ruby_llm/content.rb', line 68

def format
  @value
end

#to_hObject



72
73
74
# File 'lib/ruby_llm/content.rb', line 72

def to_h
  @value
end