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



575
576
577
# File 'lib/xberg/native.rb', line 575

def name
  @name
end

Class Method Details

.from_hash(hash) ⇒ Object



593
594
595
# File 'lib/xberg/native.rb', line 593

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

Instance Method Details

#custom?Boolean

Returns:

  • (Boolean)


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

def custom? = false

#llm?Boolean

Returns:

  • (Boolean)


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

def llm? = false

#plugin?Boolean

Returns:

  • (Boolean)


589
590
591
# File 'lib/xberg/native.rb', line 589

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

#preset?Boolean

Returns:

  • (Boolean)


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

def preset? = true