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



827
828
829
# File 'lib/xberg/native.rb', line 827

def name
  @name
end

Class Method Details

.from_hash(hash) ⇒ Object



846
847
848
# File 'lib/xberg/native.rb', line 846

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

Instance Method Details

#custom?Boolean

Returns:

  • (Boolean)


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

def custom? = false

#llm?Boolean

Returns:

  • (Boolean)


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

def llm? = false

#plugin?Boolean

Returns:

  • (Boolean)


842
843
844
# File 'lib/xberg/native.rb', line 842

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

#preset?Boolean

Returns:

  • (Boolean)


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

def preset? = true