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



1039
1040
1041
# File 'lib/xberg/native.rb', line 1039

def name
  @name
end

Class Method Details

.from_hash(hash) ⇒ Object



1056
1057
1058
# File 'lib/xberg/native.rb', line 1056

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

Instance Method Details

#custom?Boolean

Returns:

  • (Boolean)


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

def custom? = false

#plugin?Boolean

Returns:

  • (Boolean)


1052
1053
1054
# File 'lib/xberg/native.rb', line 1052

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

#preset?Boolean

Returns:

  • (Boolean)


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

def preset? = false