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



358
359
360
# File 'lib/liter_llm/native.rb', line 358

def text
  @text
end

Class Method Details

.from_hash(hash) ⇒ Object



374
375
376
# File 'lib/liter_llm/native.rb', line 374

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

Instance Method Details

#image_base64?Boolean

Returns:

  • (Boolean)


370
371
372
# File 'lib/liter_llm/native.rb', line 370

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

#image_url?Boolean

Returns:

  • (Boolean)


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

def image_url? = false

#text?Boolean

Returns:

  • (Boolean)


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

def text? = true