Class: Xberg::SparseEmbeddingModelTypePlugin

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

Overview

In-process sparse-embedding backend registered via the plugin system.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



964
965
966
# File 'lib/xberg/native.rb', line 964

def name
  @name
end

Class Method Details

.from_hash(hash) ⇒ Object



981
982
983
# File 'lib/xberg/native.rb', line 981

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

Instance Method Details

#custom?Boolean

Returns:

  • (Boolean)


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

def custom? = false

#plugin?Boolean

Returns:

  • (Boolean)


977
978
979
# File 'lib/xberg/native.rb', line 977

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

#preset?Boolean

Returns:

  • (Boolean)


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

def preset? = false