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



611
612
613
# File 'lib/xberg/native.rb', line 611

def name
  @name
end

Class Method Details

.from_hash(hash) ⇒ Object



630
631
632
# File 'lib/xberg/native.rb', line 630

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

Instance Method Details

#custom?Boolean

Returns:

  • (Boolean)


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

def custom? = false

#llm?Boolean

Returns:

  • (Boolean)


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

def llm? = false

#plugin?Boolean

Returns:

  • (Boolean)


626
627
628
# File 'lib/xberg/native.rb', line 626

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

#preset?Boolean

Returns:

  • (Boolean)


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

def preset? = true