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



800
801
802
# File 'lib/xberg/native.rb', line 800

def name
  @name
end

Class Method Details

.from_hash(hash) ⇒ Object



819
820
821
# File 'lib/xberg/native.rb', line 819

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

Instance Method Details

#custom?Boolean

Returns:

  • (Boolean)


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

def custom? = false

#llm?Boolean

Returns:

  • (Boolean)


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

def llm? = false

#plugin?Boolean

Returns:

  • (Boolean)


815
816
817
# File 'lib/xberg/native.rb', line 815

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

#preset?Boolean

Returns:

  • (Boolean)


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

def preset? = true