Class: Xberg::RerankerModelTypePreset

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

Overview

Use a preset cross-encoder model (recommended).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



605
606
607
# File 'lib/xberg/native.rb', line 605

def name
  @name
end

Class Method Details

.from_hash(hash) ⇒ Object



624
625
626
# File 'lib/xberg/native.rb', line 624

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

Instance Method Details

#custom?Boolean

Returns:

  • (Boolean)


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

def custom? = false

#llm?Boolean

Returns:

  • (Boolean)


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

def llm? = false

#plugin?Boolean

Returns:

  • (Boolean)


620
621
622
# File 'lib/xberg/native.rb', line 620

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

#preset?Boolean

Returns:

  • (Boolean)


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

def preset? = true