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)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



5096
5097
5098
# File 'lib/xberg/native.rb', line 5096

def name
  @name
end

Class Method Details

.from_hash(hash) ⇒ Object



5112
5113
5114
# File 'lib/xberg/native.rb', line 5112

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

Instance Method Details

#custom?Boolean

Returns:

  • (Boolean)


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

def custom? = false

#plugin?Boolean

Returns:

  • (Boolean)


5108
5109
5110
# File 'lib/xberg/native.rb', line 5108

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

#preset?Boolean

Returns:

  • (Boolean)


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

def preset? = false