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



603
604
605
# File 'lib/liter_llm/native.rb', line 603

def image_url
  @image_url
end

Class Method Details

.from_hash(hash) ⇒ Object



619
620
621
# File 'lib/liter_llm/native.rb', line 619

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

Instance Method Details

#image_base64?Boolean

Returns:

  • (Boolean)


615
616
617
# File 'lib/liter_llm/native.rb', line 615

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

#image_url?Boolean

Returns:

  • (Boolean)


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

def image_url? = true

#text?Boolean

Returns:

  • (Boolean)


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

def text? = false