ruby-openai 0.3.0 → 1.0.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: df318e71dd94c35f0779b393494833aba28be2d0849e76593cf1caa023694e28
4
- data.tar.gz: 294916dd3edb50a70bed4bc2c6b96c0b385e19b25e7ded70f696b143be7e776b
3
+ metadata.gz: 4f49ef2d01087a09b453513bf5b4d19fa76ac1e650a96234be40cfe88ca70141
4
+ data.tar.gz: aa28c65f90677820fbc035c5f1dfaa885fdeb7ab5f613da746566f4a27194df5
5
5
  SHA512:
6
- metadata.gz: e9762da7271d38a2f1ea744923799321df71e1d9025e2f7d8a4ca72a621a406760106e7d718ba6e493a1fc63e45d3c44032c874fc5b9ae3b553602066cfa789a
7
- data.tar.gz: 8709f60b06f8b7713cb82f106d4c9c4698b04d327760bd57c6d466344f55abf61dd20feb2886f7f1f506d40941d04dbd75bb3b0725af02ac79d13cffc4f1fb0b
6
+ metadata.gz: 8575de950acf0ad5c6439f59bd8718cd4ffdade7527ad8f5177ea95a35821bdf7d7f9535a105183dadb357f6ba322a14ba43bbbbae49dd4f782c646f9ced8a4d
7
+ data.tar.gz: 3f09519f5d3c364d03f9d4bb18269fe63e2670566884b099bf1c9862126c8fc10fcf30ac1774c699f8fc7c0f7fb1c57d5f677434e825421f76a5b9c6e0be13ed
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.0] - 2021-02-01
9
+
10
+ ### Removed
11
+
12
+ - Remove deprecated method Client#call - use Client#completions instead.
13
+
14
+ ### Changed
15
+
16
+ - Rename 'master' branch to 'main' branch.
17
+ - Bump dependencies.
18
+
8
19
  ## [0.3.0] - 2020-11-22
9
20
 
10
21
  ### Added
data/Gemfile CHANGED
@@ -5,7 +5,7 @@ gemspec
5
5
 
6
6
  gem "byebug", "~> 11.1.3"
7
7
  gem "rake", "~> 13.0"
8
- gem "rspec", "~> 3.0"
9
- gem "rubocop", "~> 0.93.1"
8
+ gem "rspec", "~> 3.10"
9
+ gem "rubocop", "~> 1.9.0"
10
10
  gem "vcr", "~> 6.0.0"
11
- gem "webmock", "~> 3.9.2"
11
+ gem "webmock", "~> 3.11.2"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-openai (0.3.0)
4
+ ruby-openai (1.0.0)
5
5
  dotenv (~> 2.7.6)
6
6
  httparty (~> 0.18.1)
7
7
 
@@ -10,9 +10,10 @@ GEM
10
10
  specs:
11
11
  addressable (2.7.0)
12
12
  public_suffix (>= 2.0.2, < 5.0)
13
- ast (2.4.1)
13
+ ast (2.4.2)
14
14
  byebug (11.1.3)
15
- crack (0.4.4)
15
+ crack (0.4.5)
16
+ rexml
16
17
  diff-lcs (1.4.4)
17
18
  dotenv (2.7.6)
18
19
  hashdiff (1.0.1)
@@ -23,42 +24,42 @@ GEM
23
24
  mime-types-data (~> 3.2015)
24
25
  mime-types-data (3.2020.0512)
25
26
  multi_xml (0.6.0)
26
- parallel (1.19.2)
27
- parser (2.7.2.0)
27
+ parallel (1.20.1)
28
+ parser (3.0.0.0)
28
29
  ast (~> 2.4.1)
29
30
  public_suffix (4.0.6)
30
31
  rainbow (3.0.0)
31
- rake (13.0.1)
32
- regexp_parser (1.8.2)
32
+ rake (13.0.3)
33
+ regexp_parser (2.0.3)
33
34
  rexml (3.2.4)
34
- rspec (3.9.0)
35
- rspec-core (~> 3.9.0)
36
- rspec-expectations (~> 3.9.0)
37
- rspec-mocks (~> 3.9.0)
38
- rspec-core (3.9.2)
39
- rspec-support (~> 3.9.3)
40
- rspec-expectations (3.9.2)
35
+ rspec (3.10.0)
36
+ rspec-core (~> 3.10.0)
37
+ rspec-expectations (~> 3.10.0)
38
+ rspec-mocks (~> 3.10.0)
39
+ rspec-core (3.10.1)
40
+ rspec-support (~> 3.10.0)
41
+ rspec-expectations (3.10.1)
41
42
  diff-lcs (>= 1.2.0, < 2.0)
42
- rspec-support (~> 3.9.0)
43
- rspec-mocks (3.9.1)
43
+ rspec-support (~> 3.10.0)
44
+ rspec-mocks (3.10.1)
44
45
  diff-lcs (>= 1.2.0, < 2.0)
45
- rspec-support (~> 3.9.0)
46
- rspec-support (3.9.3)
47
- rubocop (0.93.1)
46
+ rspec-support (~> 3.10.0)
47
+ rspec-support (3.10.1)
48
+ rubocop (1.9.0)
48
49
  parallel (~> 1.10)
49
- parser (>= 2.7.1.5)
50
+ parser (>= 3.0.0.0)
50
51
  rainbow (>= 2.2.2, < 4.0)
51
- regexp_parser (>= 1.8)
52
+ regexp_parser (>= 1.8, < 3.0)
52
53
  rexml
53
- rubocop-ast (>= 0.6.0)
54
+ rubocop-ast (>= 1.2.0, < 2.0)
54
55
  ruby-progressbar (~> 1.7)
55
- unicode-display_width (>= 1.4.0, < 2.0)
56
- rubocop-ast (0.7.1)
56
+ unicode-display_width (>= 1.4.0, < 3.0)
57
+ rubocop-ast (1.4.1)
57
58
  parser (>= 2.7.1.5)
58
- ruby-progressbar (1.10.1)
59
- unicode-display_width (1.7.0)
59
+ ruby-progressbar (1.11.0)
60
+ unicode-display_width (2.0.0)
60
61
  vcr (6.0.0)
61
- webmock (3.9.2)
62
+ webmock (3.11.2)
62
63
  addressable (>= 2.3.6)
63
64
  crack (>= 0.3.2)
64
65
  hashdiff (>= 0.4.0, < 2.0.0)
@@ -69,11 +70,11 @@ PLATFORMS
69
70
  DEPENDENCIES
70
71
  byebug (~> 11.1.3)
71
72
  rake (~> 13.0)
72
- rspec (~> 3.0)
73
- rubocop (~> 0.93.1)
73
+ rspec (~> 3.10)
74
+ rubocop (~> 1.9.0)
74
75
  ruby-openai!
75
76
  vcr (~> 6.0.0)
76
- webmock (~> 3.9.2)
77
+ webmock (~> 3.11.2)
77
78
 
78
79
  BUNDLED WITH
79
- 2.1.4
80
+ 2.2.3
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Ruby::OpenAI
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/ruby-openai.svg)](https://badge.fury.io/rb/ruby-openai)
4
- [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/alexrudall/ruby-openai/blob/master/LICENSE.txt)
4
+ [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/alexrudall/ruby-openai/blob/main/LICENSE.txt)
5
5
  [![CircleCI Build Status](https://circleci.com/gh/alexrudall/ruby-openai.svg?style=shield)](https://circleci.com/gh/alexrudall/ruby-openai)
6
6
 
7
7
  A simple Ruby wrapper for the [OpenAI GPT-3 API](https://openai.com/blog/openai-api/).
@@ -76,7 +76,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
76
76
 
77
77
  ## Contributing
78
78
 
79
- Bug reports and pull requests are welcome on GitHub at https://github.com/alexrudall/ruby-openai. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/alexrudall/ruby-openai/blob/master/CODE_OF_CONDUCT.md).
79
+ Bug reports and pull requests are welcome on GitHub at https://github.com/alexrudall/ruby-openai. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/alexrudall/ruby-openai/blob/main/CODE_OF_CONDUCT.md).
80
80
 
81
81
  ## License
82
82
 
@@ -84,4 +84,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
84
84
 
85
85
  ## Code of Conduct
86
86
 
87
- Everyone interacting in the Ruby::OpenAI project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/alexrudall/ruby-openai/blob/master/CODE_OF_CONDUCT.md).
87
+ Everyone interacting in the Ruby::OpenAI project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/alexrudall/ruby-openai/blob/main/CODE_OF_CONDUCT.md).
@@ -31,27 +31,6 @@ module OpenAI
31
31
  )
32
32
  end
33
33
 
34
- # rubocop:disable Metrics/MethodLength
35
- # rubocop:disable Layout/LineLength
36
- def call(engine:, prompt:, max_tokens:, version: default_version)
37
- warn "[DEPRECATION] `Client#call` is deprecated and will be removed in a future version of ruby-openai.
38
- Please use `Client#completions` instead, like this:
39
- client.completions(engine: 'davinci', parameters: { prompt: 'Once upon a time', max_tokens: 5 })
40
- "
41
- self.class.post(
42
- "/#{version}/engines/#{engine}/completions",
43
- headers: {
44
- "Content-Type" => "application/json",
45
- "Authorization" => "Bearer #{@access_token}"
46
- },
47
- body: {
48
- prompt: prompt, max_tokens: max_tokens
49
- }.to_json
50
- )
51
- end
52
- # rubocop:enable Metrics/MethodLength
53
- # rubocop:enable Layout/LineLength
54
-
55
34
  private
56
35
 
57
36
  def default_version
@@ -1,5 +1,5 @@
1
1
  module Ruby
2
2
  module OpenAI
3
- VERSION = "0.3.0".freeze
3
+ VERSION = "1.0.0".freeze
4
4
  end
5
5
  end
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
13
13
 
14
14
  spec.metadata["homepage_uri"] = spec.homepage
15
15
  spec.metadata["source_code_uri"] = "https://github.com/alexrudall/ruby-openai"
16
- spec.metadata["changelog_uri"] = "https://github.com/alexrudall/ruby-openai/blob/master/CHANGELOG.md"
16
+ spec.metadata["changelog_uri"] = "https://github.com/alexrudall/ruby-openai/blob/main/CHANGELOG.md"
17
17
 
18
18
  # Specify which files should be added to the gem when it is released.
19
19
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-openai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-22 00:00:00.000000000 Z
11
+ date: 2021-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv
@@ -71,7 +71,7 @@ licenses:
71
71
  metadata:
72
72
  homepage_uri: https://github.com/alexrudall/ruby-openai
73
73
  source_code_uri: https://github.com/alexrudall/ruby-openai
74
- changelog_uri: https://github.com/alexrudall/ruby-openai/blob/master/CHANGELOG.md
74
+ changelog_uri: https://github.com/alexrudall/ruby-openai/blob/main/CHANGELOG.md
75
75
  post_install_message:
76
76
  rdoc_options: []
77
77
  require_paths:
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  requirements: []
90
- rubygems_version: 3.1.4
90
+ rubygems_version: 3.2.3
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: A Ruby gem for the OpenAI GPT-3 API