Class: LiterLlm::EmbeddingContentPartImageBase64

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
EmbeddingContentPart
Defined in:
lib/liter_llm/native.rb

Overview

Image encoded as a complete data URL.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#image_base64Object (readonly)

rubocop:disable Lint/UselessMethodDefinition



400
401
402
# File 'lib/liter_llm/native.rb', line 400

def image_base64
  @image_base64
end

Class Method Details

.from_hash(hash) ⇒ Object



416
417
418
# File 'lib/liter_llm/native.rb', line 416

def self.from_hash(hash)
  new(image_base64: hash[:image_base64] || hash["image_base64"])
end

Instance Method Details

#image_base64?Boolean

Returns:

  • (Boolean)


412
413
414
# File 'lib/liter_llm/native.rb', line 412

def image_base64? = true
# @param hash [Hash] deserialized from the native extension
# @return [self]

#image_url?Boolean

Returns:

  • (Boolean)


410
# File 'lib/liter_llm/native.rb', line 410

def image_url? = false

#text?Boolean

Returns:

  • (Boolean)


408
# File 'lib/liter_llm/native.rb', line 408

def text? = false