Class: LiterLlm::EmbeddingContentPartText

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

Overview

Plain text.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#textObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



582
583
584
# File 'lib/liter_llm/native.rb', line 582

def text
  @text
end

Class Method Details

.from_hash(hash) ⇒ Object



598
599
600
# File 'lib/liter_llm/native.rb', line 598

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

Instance Method Details

#image_base64?Boolean

Returns:

  • (Boolean)


594
595
596
# File 'lib/liter_llm/native.rb', line 594

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

#image_url?Boolean

Returns:

  • (Boolean)


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

def image_url? = false

#text?Boolean

Returns:

  • (Boolean)


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

def text? = true