cohere-ruby 0.9.1 → 0.9.3

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: 0c67041bcd2e0d7e0992bedc136a47406882b80f1ec4eb2b8ed9d0d359d27a67
4
- data.tar.gz: d55d966852f0046ac1bb869200d37da08a7cccee46cf850259f38b8bd4e14b92
3
+ metadata.gz: 30cf10dfc4dfb53a96b717073e6a682173d398f9eacd466a7811df3eabc1096b
4
+ data.tar.gz: f030243be8af8682a996ffbebdc7735bfdf13cbdb7021f3910c499f847419eae
5
5
  SHA512:
6
- metadata.gz: 492c6e18297271bdcd600842e9c1a42eac2660d59e794813875b2eb5b70e899f4a687812b7e470c218a123d2ce00cdbd720d690f0baf492bdefff0d50ee8320b
7
- data.tar.gz: d955326483690a221dbfc8c2a1ddbf60b9a7731e34b2458f0b87acf4a932790d3f0d8f618ff9c71003c06e2cb5cf32d44915b824c3364a9229283223780f4a5d
6
+ metadata.gz: 4242f30c3990f19ffb8aac096db95379c712a1249142085be83cd0d02f229d40c756adb2f794b1683d9ba44d7bbaa23e18745672b938525b8832a70efaa22798
7
+ data.tar.gz: 153a6d5dca9f3771ef374a7273de98f3397addb845db0ac7736ec473e2ec910837ec746049be047672c3e87b9e239e702623adb59991743d42f260150cdee864
data/Gemfile.lock CHANGED
@@ -1,21 +1,24 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cohere-ruby (0.9.1)
5
- faraday (~> 2.7.0)
4
+ cohere-ruby (0.9.3)
5
+ faraday (~> 1)
6
+ faraday_middleware (~> 1)
6
7
 
7
8
  GEM
8
9
  remote: https://rubygems.org/
9
10
  specs:
10
11
  ast (2.4.2)
11
12
  diff-lcs (1.5.0)
12
- faraday (2.7.4)
13
- faraday-net_http (>= 2.0, < 3.1)
14
- ruby2_keywords (>= 0.0.4)
15
- faraday-net_http (3.0.2)
13
+ faraday (1.2.0)
14
+ multipart-post (>= 1.2, < 3)
15
+ ruby2_keywords
16
+ faraday_middleware (1.2.0)
17
+ faraday (~> 1.0)
16
18
  json (2.6.3)
17
19
  language_server-protocol (3.17.0.3)
18
20
  lint_roller (1.0.0)
21
+ multipart-post (2.3.0)
19
22
  parallel (1.23.0)
20
23
  parser (3.2.2.1)
21
24
  ast (~> 2.4.1)
data/README.md CHANGED
@@ -24,6 +24,8 @@ If bundler is not being used to manage dependencies, install the gem by executin
24
24
 
25
25
  ### Instantiating API client
26
26
  ```ruby
27
+ require "cohere"
28
+
27
29
  client = Cohere::Client.new(
28
30
  api_key: ENV['COHERE_API_KEY']
29
31
  )
data/lib/cohere/client.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "faraday"
4
+ require "faraday_middleware"
4
5
 
5
6
  module Cohere
6
7
  class Client
@@ -25,7 +26,7 @@ module Cohere
25
26
  frequency_penalty: nil,
26
27
  presence_penalty: nil,
27
28
  end_sequences: nil,
28
- stop_sequence: nil,
29
+ stop_sequences: nil,
29
30
  return_likelihoods: nil,
30
31
  logit_bias: nil,
31
32
  truncate: nil
@@ -42,7 +43,7 @@ module Cohere
42
43
  req.body[:frequency_penalty] = frequency_penalty if frequency_penalty
43
44
  req.body[:presence_penalty] = presence_penalty if presence_penalty
44
45
  req.body[:end_sequences] = end_sequences if end_sequences
45
- req.body[:stop_sequence] = stop_sequence if stop_sequence
46
+ req.body[:stop_sequences] = stop_sequences if stop_sequences
46
47
  req.body[:return_likelihoods] = return_likelihoods if return_likelihoods
47
48
  req.body[:logit_bias] = logit_bias if logit_bias
48
49
  req.body[:truncate] = truncate if truncate
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cohere
4
- VERSION = "0.9.1"
4
+ VERSION = "0.9.3"
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.1
4
+ version: 0.9.3
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-04-24 00:00:00.000000000 Z
11
+ date: 2023-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.7.0
19
+ version: '1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.7.0
26
+ version: '1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: faraday_middleware
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1'
27
41
  description: Cohere API client for Ruby.
28
42
  email:
29
43
  - andrei.bondarev13@gmail.com