Class: Xberg::EmbeddingModelTypeLlm

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

Overview

Provider-hosted embedding model via liter-llm.

Uses the model specified in the nested LlmConfig (e.g., "openai/text-embedding-3-small").

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#llmObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



729
730
731
# File 'lib/xberg/native.rb', line 729

def llm
  @llm
end

Class Method Details

.from_hash(hash) ⇒ Object



748
749
750
# File 'lib/xberg/native.rb', line 748

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

Instance Method Details

#custom?Boolean

Returns:

  • (Boolean)


740
# File 'lib/xberg/native.rb', line 740

def custom? = false

#llm?Boolean

Returns:

  • (Boolean)


742
# File 'lib/xberg/native.rb', line 742

def llm? = true

#plugin?Boolean

Returns:

  • (Boolean)


744
745
746
# File 'lib/xberg/native.rb', line 744

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

#preset?Boolean

Returns:

  • (Boolean)


738
# File 'lib/xberg/native.rb', line 738

def preset? = false