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



725
726
727
# File 'lib/xberg/native.rb', line 725

def name
  @name
end

Class Method Details

.from_hash(hash) ⇒ Object



744
745
746
# File 'lib/xberg/native.rb', line 744

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

Instance Method Details

#custom?Boolean

Returns:

  • (Boolean)


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

def custom? = false

#llm?Boolean

Returns:

  • (Boolean)


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

def llm? = false

#plugin?Boolean

Returns:

  • (Boolean)


740
741
742
# File 'lib/xberg/native.rb', line 740

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

#preset?Boolean

Returns:

  • (Boolean)


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

def preset? = true