mini_embed 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/mini_embed/mini_embed.c +743 -389
- data/lib/mini_embed.rb +1 -1
- metadata +1 -1
data/lib/mini_embed.rb
CHANGED
|
@@ -6,7 +6,7 @@ class MiniEmbed
|
|
|
6
6
|
# @param text [String] - text to extract embeddings from
|
|
7
7
|
# @param type [Symbol, nil] - :binary or :vector - type of data you want to receive
|
|
8
8
|
# @return [String, <Float>] - type == :binary - binary string, type == :vector - array of floats
|
|
9
|
-
def embeddings(text
|
|
9
|
+
def embeddings(text:, type: :vector)
|
|
10
10
|
binary_data = embed(text: text) # call original C method
|
|
11
11
|
|
|
12
12
|
return binary_data if type == :binary
|