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)

Returns the value of attribute llm

Returns:

  • (Object)

    the current value of llm



4780
4781
4782
# File 'lib/xberg/native.rb', line 4780

def llm
  @llm
end

Class Method Details

.from_hash(hash) ⇒ Object



4801
4802
4803
# File 'lib/xberg/native.rb', line 4801

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

Instance Method Details

#custom?Boolean

Returns:

  • (Boolean)


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

def custom? = false

#llm?Boolean

Returns:

  • (Boolean)


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

def llm? = true

#plugin?Boolean

Returns:

  • (Boolean)


4797
4798
4799
# File 'lib/xberg/native.rb', line 4797

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

#preset?Boolean

Returns:

  • (Boolean)


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

def preset? = false