Class: Xberg::RerankerModelTypeLlm

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

Overview

Provider-hosted reranker via liter-llm (e.g. Cohere, Jina, Voyage).

The model in the nested LlmConfig must be a rerank-capable model ID (e.g. "cohere/rerank-english-v3.0").

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#llmObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



888
889
890
# File 'lib/xberg/native.rb', line 888

def llm
  @llm
end

Class Method Details

.from_hash(hash) ⇒ Object



907
908
909
# File 'lib/xberg/native.rb', line 907

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

Instance Method Details

#custom?Boolean

Returns:

  • (Boolean)


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

def custom? = false

#llm?Boolean

Returns:

  • (Boolean)


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

def llm? = true

#plugin?Boolean

Returns:

  • (Boolean)


903
904
905
# File 'lib/xberg/native.rb', line 903

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

#preset?Boolean

Returns:

  • (Boolean)


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

def preset? = false