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



1066
1067
1068
# File 'lib/xberg/native.rb', line 1066

def name
  @name
end

Class Method Details

.from_hash(hash) ⇒ Object



1083
1084
1085
# File 'lib/xberg/native.rb', line 1083

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

Instance Method Details

#custom?Boolean

Returns:

  • (Boolean)


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

def custom? = false

#plugin?Boolean

Returns:

  • (Boolean)


1079
1080
1081
# File 'lib/xberg/native.rb', line 1079

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

#preset?Boolean

Returns:

  • (Boolean)


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

def preset? = false