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



627
628
629
# File 'lib/xberg/native.rb', line 627

def llm
  @llm
end

Class Method Details

.from_hash(hash) ⇒ Object



646
647
648
# File 'lib/xberg/native.rb', line 646

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

Instance Method Details

#custom?Boolean

Returns:

  • (Boolean)


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

def custom? = false

#llm?Boolean

Returns:

  • (Boolean)


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

def llm? = true

#plugin?Boolean

Returns:

  • (Boolean)


642
643
644
# File 'lib/xberg/native.rb', line 642

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

#preset?Boolean

Returns:

  • (Boolean)


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

def preset? = false