cohere-ruby 0.9.4 → 0.9.5

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: e9bf458b653b2838e74a859b33401ba09bdccbaa71960015b50a017c89f921f1
4
- data.tar.gz: 4a50722759de44ff44e6bc5f1306d49e158f7551a8faa0d6e0600f42c5d501a2
3
+ metadata.gz: 7b0e0ed353f0966ed10f65a2cdbf51ed9fc4970ee94279ce21859b59913eb5ed
4
+ data.tar.gz: 228d57e4b64bc7abb49e0782674bfd052d2013a764686b7579d1ff7c489db08d
5
5
  SHA512:
6
- metadata.gz: 89ac1d384eeba3c0754339672569f20192688c3376413f6d19e01083ea08c2b2cf6e1e241d210a0699c077d26e0b5a7a2801eff86d46d98cafba02fc6606c498
7
- data.tar.gz: a9e3cb2e9fdfaf7aa62d85d854e1176365d7f5b6bea7cdbf5113c1b0082459aa9e9f8cea7a78fdb0d7e2bfe6dc491c273949c98acfca73ad5ee580132b966e63
6
+ metadata.gz: c7c85f0c9e1498fdf679faf47e1a8f3daf343af701d1d77c74cf256b71530f543822e72b5a988018f5638d70d43771875dc6c6b9e402931a74d432e2b24a0a3d
7
+ data.tar.gz: 150f3bfa89f3707d6af9b7bbb5c95b72aafdc438789a14d33646b6656a446784fdb7dc04d0fab4cafaee1ff0b91eb3dfbf2ab7f701efbea1a20c0a801ea449e4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cohere-ruby (0.9.4)
4
+ cohere-ruby (0.9.5)
5
5
  faraday (>= 1.0.0)
6
6
  faraday_middleware (>= 1.0.0)
7
7
 
@@ -71,6 +71,7 @@ GEM
71
71
 
72
72
  PLATFORMS
73
73
  x86_64-darwin-19
74
+ x86_64-darwin-21
74
75
  x86_64-linux
75
76
 
76
77
  DEPENDENCIES
data/lib/cohere/client.rb CHANGED
@@ -83,16 +83,16 @@ module Cohere
83
83
  response.body
84
84
  end
85
85
 
86
- def tokenize(text:)
86
+ def tokenize(text:, model: nil)
87
87
  response = connection.post("tokenize") do |req|
88
- req.body = {text: text}
88
+ req.body = model.nil? ? {text: text} : {text: text, model: model}
89
89
  end
90
90
  response.body
91
91
  end
92
92
 
93
- def detokenize(tokens:)
93
+ def detokenize(tokens:, model: nil)
94
94
  response = connection.post("detokenize") do |req|
95
- req.body = {tokens: tokens}
95
+ req.body = model.nil? ? {tokens: tokens} : {tokens: tokens, model: model}
96
96
  end
97
97
  response.body
98
98
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cohere
4
- VERSION = "0.9.4"
4
+ VERSION = "0.9.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cohere-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Bondarev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-19 00:00:00.000000000 Z
11
+ date: 2023-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday