voyageai 1.5.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: 651f676fcb2fa068cf44f37fda02d1185b776ca83fc0f6099362d5e4deb7a250
4
- data.tar.gz: f3a22402be82fd02ec94628aeab067aec45cfcc6c203f7d75af13a00f95b580b
3
+ metadata.gz: 0b5925babfbf1c84905e899fa8c77c72dae9f7cc955e22f93fc85dc57eca1f88
4
+ data.tar.gz: a298d36eafe3d9c093fcf930d7378f69ff36ece1b8d29eab13f28d13b0f88535
5
5
  SHA512:
6
- metadata.gz: 0b70798b6ee15febae3f263def8f118b4177f73e553bf3463e77f2638259b62d95025dc6336049eedec71fdccdac80512e54c55bd65b70333fc3f29518d97367
7
- data.tar.gz: 2aa09dc2ea94771f309af4e40aa4340842b1181e1e82ddc270b75bddd5120044d0dd195bf687e302cf270da12c312261dc6a523e5b69a0184bacf0aafbb10da1
6
+ metadata.gz: 276baec9fc211d1847df5912e4a461f878f76554d879cbafcc9c5eb804b55b5a0fcb52a4b2a7203af04b3d2899bec936e3c66a2e9365043af9472525dca8b664
7
+ data.tar.gz: 8f57dfcf36392ac13bee6ec59895ac8bfde0c215114e8a5aef0ac3392187283122487ba0d15b66303e91bcbfaeed42349609bd7e7871484b101c4f6c2281216a
data/README.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # VoyageAI
2
2
 
3
+ [![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/ksylvest/voyageai/blob/main/LICENSE)
4
+ [![RubyGems](https://img.shields.io/gem/v/voyageai)](https://rubygems.org/gems/voyageai)
5
+ [![GitHub](https://img.shields.io/badge/github-repo-blue.svg)](https://github.com/ksylvest/voyageai)
6
+ [![Yard](https://img.shields.io/badge/docs-site-blue.svg)](https://voyageai.ksylvest.com)
7
+ [![CircleCI](https://img.shields.io/circleci/build/github/ksylvest/voyageai)](https://circleci.com/gh/ksylvest/voyageai)
8
+
3
9
  `voyageai` is a ruby client for [VoyageAI](https://www.voyageai.com)
4
10
 
5
11
  ## Installation
@@ -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.5.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.5.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
@@ -62,9 +62,11 @@ homepage: https://github.com/ksylvest/voyageai
62
62
  licenses:
63
63
  - MIT
64
64
  metadata:
65
- homepage_uri: https://github.com/ksylvest/voyageai
66
- changelog_uri: https://github.com/ksylvest/voyageai/releases
67
65
  rubygems_mfa_required: 'true'
66
+ homepage_uri: https://github.com/ksylvest/voyageai
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
+ documentation_uri: https://voyageai.ksylvest.com/
68
70
  rdoc_options: []
69
71
  require_paths:
70
72
  - lib