omniai 3.5.0 → 3.6.0
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/lib/omniai/client.rb +2 -1
- data/lib/omniai/embed.rb +9 -1
- data/lib/omniai/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ae7a0b04197a95f107c66d4d7108435f44f82d0e3e4b3a956cb755d3ac352c6a
|
|
4
|
+
data.tar.gz: 9d8a85ede589c08431d49ada35d2a13ed57338f7eafbc7231134e1866e083bc3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 05372f0de7a16a3da31702eebfa49b2cd1bbc890ee1777820b575e81c72d59d532941ed96d52ac572b58fd34ab9f897fcda2d85bd91d21be00b115de39a1dac2
|
|
7
|
+
data.tar.gz: f2b518b58405e2a4995b282280693f4d985cd1b9ce129abc04a55e679e62b5b9a495aa9ed980449874af43f7d8cd5108c717bed5b5f4337a3d65f3ef1ecd9c31
|
data/lib/omniai/client.rb
CHANGED
|
@@ -240,9 +240,10 @@ module OmniAI
|
|
|
240
240
|
#
|
|
241
241
|
# @param input [String] required
|
|
242
242
|
# @param model [String] required
|
|
243
|
+
# @param options [Hash] provider-specific options
|
|
243
244
|
#
|
|
244
245
|
# @return [OmniAI::Embed::Embedding]
|
|
245
|
-
def embed(input, model
|
|
246
|
+
def embed(input, model:, **options)
|
|
246
247
|
raise NotImplementedError, "#{self.class.name}#embed undefined"
|
|
247
248
|
end
|
|
248
249
|
end
|
data/lib/omniai/embed.rb
CHANGED
|
@@ -34,12 +34,14 @@ module OmniAI
|
|
|
34
34
|
# @param input [String] required
|
|
35
35
|
# @param client [Client] the client
|
|
36
36
|
# @param model [String] required
|
|
37
|
+
# @param options [Hash] provider-specific options
|
|
37
38
|
#
|
|
38
39
|
# @return [Response]
|
|
39
|
-
def initialize(input, client:, model
|
|
40
|
+
def initialize(input, client:, model:, **options)
|
|
40
41
|
@input = input
|
|
41
42
|
@client = client
|
|
42
43
|
@model = model
|
|
44
|
+
@options = options
|
|
43
45
|
end
|
|
44
46
|
|
|
45
47
|
# @raise [Error]
|
|
@@ -88,5 +90,11 @@ module OmniAI
|
|
|
88
90
|
def path
|
|
89
91
|
raise NotImplementedError, "#{self.class.name}#path undefined"
|
|
90
92
|
end
|
|
93
|
+
|
|
94
|
+
# @param value [Object]
|
|
95
|
+
# @return [Array]
|
|
96
|
+
def arrayify(value)
|
|
97
|
+
value.is_a?(Array) ? value : [value]
|
|
98
|
+
end
|
|
91
99
|
end
|
|
92
100
|
end
|
data/lib/omniai/version.rb
CHANGED