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)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



4698
4699
4700
# File 'lib/xberg/native.rb', line 4698

def name
  @name
end

Class Method Details

.from_hash(hash) ⇒ Object



4716
4717
4718
# File 'lib/xberg/native.rb', line 4716

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

Instance Method Details

#custom?Boolean

Returns:

  • (Boolean)


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

def custom? = false

#llm?Boolean

Returns:

  • (Boolean)


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

def llm? = false

#plugin?Boolean

Returns:

  • (Boolean)


4712
4713
4714
# File 'lib/xberg/native.rb', line 4712

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

#preset?Boolean

Returns:

  • (Boolean)


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

def preset? = true