Class: Xberg::SparseEmbeddingModelTypePreset

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
SparseEmbeddingModelType
Defined in:
lib/xberg/native.rb

Overview

Use a preset SPLADE model (recommended).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



1004
1005
1006
# File 'lib/xberg/native.rb', line 1004

def name
  @name
end

Class Method Details

.from_hash(hash) ⇒ Object



1021
1022
1023
# File 'lib/xberg/native.rb', line 1021

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

Instance Method Details

#custom?Boolean

Returns:

  • (Boolean)


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

def custom? = false

#plugin?Boolean

Returns:

  • (Boolean)


1017
1018
1019
# File 'lib/xberg/native.rb', line 1017

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

#preset?Boolean

Returns:

  • (Boolean)


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

def preset? = true