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



484
485
486
# File 'lib/xberg/native.rb', line 484

def llm
  @llm
end

Class Method Details

.from_hash(hash) ⇒ Object



502
503
504
# File 'lib/xberg/native.rb', line 502

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

Instance Method Details

#custom?Boolean

Returns:

  • (Boolean)


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

def custom? = false

#llm?Boolean

Returns:

  • (Boolean)


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

def llm? = true

#plugin?Boolean

Returns:

  • (Boolean)


498
499
500
# File 'lib/xberg/native.rb', line 498

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

#preset?Boolean

Returns:

  • (Boolean)


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

def preset? = false