Class: LiterLlm::EmbeddingContentPartImageUrl

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

Overview

Image identified by a data URL or HTTP/HTTPS URL.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#image_urlObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



379
380
381
# File 'lib/liter_llm/native.rb', line 379

def image_url
  @image_url
end

Class Method Details

.from_hash(hash) ⇒ Object



395
396
397
# File 'lib/liter_llm/native.rb', line 395

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

Instance Method Details

#image_base64?Boolean

Returns:

  • (Boolean)


391
392
393
# File 'lib/liter_llm/native.rb', line 391

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

#image_url?Boolean

Returns:

  • (Boolean)


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

def image_url? = true

#text?Boolean

Returns:

  • (Boolean)


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

def text? = false