Class: LiterLlm::OcrDocumentBase64

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

Overview

Inline base64-encoded document data.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



573
574
575
# File 'lib/liter_llm/native.rb', line 573

def data
  @data
end

#media_typeObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



573
574
575
# File 'lib/liter_llm/native.rb', line 573

def media_type
  @media_type
end

Class Method Details

.from_hash(hash) ⇒ Object



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

def self.from_hash(hash)
  new(data: hash[:data] || hash["data"], media_type: hash[:media_type] || hash["media_type"])
end

Instance Method Details

#base64?Boolean

Returns:

  • (Boolean)


586
587
588
# File 'lib/liter_llm/native.rb', line 586

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

#url?Boolean

Returns:

  • (Boolean)


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

def url? = false