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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ebad7e363a8271894e2e97f9cfeb64b830127d3628b0e86caad304df6543c94
4
- data.tar.gz: 734b5da82eb7dfba4c5743fef5883a93c2742ffed6b1a4fb48133e6f08d4b9fa
3
+ metadata.gz: ae7a0b04197a95f107c66d4d7108435f44f82d0e3e4b3a956cb755d3ac352c6a
4
+ data.tar.gz: 9d8a85ede589c08431d49ada35d2a13ed57338f7eafbc7231134e1866e083bc3
5
5
  SHA512:
6
- metadata.gz: e1f2d0609e35387be138723c0741234290a17d80ec73194b6436fb966384c2bd0f94c4c9da663770a28a8200a222aa80988d8336631d3b2e83f3c8d8618c7fb8
7
- data.tar.gz: 7de52e502f58159e78ff2817a46ac16c078db89bc2b9a89603af7e1726396b8fc0f750cdaf60958cfda621be30f96cb2b0af8339a1fb13906fa28d1b6915a7aa
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OmniAI
4
- VERSION = "3.5.0"
4
+ VERSION = "3.6.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniai
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Sylvestre