voyageai 1.6.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8afba7d9e268ee2d7c8f606bb8dc13794839c960d31a0dada531dc92002d1122
4
- data.tar.gz: 29a4d077a33abda9c88eb95c17abeb1e785cde693ba5a85fc2e54967028c358b
3
+ metadata.gz: 0b5925babfbf1c84905e899fa8c77c72dae9f7cc955e22f93fc85dc57eca1f88
4
+ data.tar.gz: a298d36eafe3d9c093fcf930d7378f69ff36ece1b8d29eab13f28d13b0f88535
5
5
  SHA512:
6
- metadata.gz: 3defa2dcaaee1f8da7e4fcd492d082d9ac63d1e5c22994b03ca1bff091327b84c883ef88dba1b1722bda1c7169eb6403227661fb649bac25aa2281c4188ec94a
7
- data.tar.gz: 0371ccd81feb78fb19566c9be5bb71c43306c395d47002a917cd314af2985dd92967126f69179a1ca976dae750fc787393e442f74d0134a42f4e112575d3cb4f
6
+ metadata.gz: 276baec9fc211d1847df5912e4a461f878f76554d879cbafcc9c5eb804b55b5a0fcb52a4b2a7203af04b3d2899bec936e3c66a2e9365043af9472525dca8b664
7
+ data.tar.gz: 8f57dfcf36392ac13bee6ec59895ac8bfde0c215114e8a5aef0ac3392187283122487ba0d15b66303e91bcbfaeed42349609bd7e7871484b101c4f6c2281216a
@@ -41,10 +41,11 @@ module VoyageAI
41
41
  # @param model [String] optional (e.g. VoyageAI::Model::VOYAGE or "voyage-3")
42
42
  # @param input_type [Symbol] optional (e.g. :query or :document)
43
43
  # @param truncation [Boolean] optional
44
+ # @param output_dimension [Integer] optional
44
45
  #
45
46
  # @return [Embedding]
46
- def embed(input, model: Model::VOYAGE, input_type: nil, truncation: nil)
47
- payload = { input: arrayify(input), model: model, truncation:, input_type: }.compact
47
+ def embed(input, model: Model::VOYAGE, input_type: nil, truncation: nil, output_dimension: nil)
48
+ payload = { input: arrayify(input), model: model, truncation:, input_type:, output_dimension: }.compact
48
49
  response = http.accept(:json).post("/#{@version}/embeddings", json: payload)
49
50
 
50
51
  raise RequestError.new(response:) unless response.status.ok?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module VoyageAI
4
- VERSION = "1.6.0"
4
+ VERSION = "1.7.0"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voyageai
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Sylvestre
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-08 00:00:00.000000000 Z
10
+ date: 2025-02-11 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: http
@@ -64,8 +64,8 @@ licenses:
64
64
  metadata:
65
65
  rubygems_mfa_required: 'true'
66
66
  homepage_uri: https://github.com/ksylvest/voyageai
67
- source_code_uri: https://github.com/ksylvest/voyageai/tree/v1.6.0
68
- changelog_uri: https://github.com/ksylvest/voyageai/releases/tag/v1.6.0
67
+ source_code_uri: https://github.com/ksylvest/voyageai/tree/v1.7.0
68
+ changelog_uri: https://github.com/ksylvest/voyageai/releases/tag/v1.7.0
69
69
  documentation_uri: https://voyageai.ksylvest.com/
70
70
  rdoc_options: []
71
71
  require_paths: