Skip to content

Commit 64ed9c8

Browse files
committed
Remove Client#call
1 parent 8b7f0c4 commit 64ed9c8

File tree

3 files changed

+12
-22
lines changed

3 files changed

+12
-22
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

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+
819
## [0.3.0] - 2020-11-22
920

1021
### Added

lib/ruby/openai/client.rb

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,6 @@ def search(engine:, documents:, query:, version: default_version)
3131
)
3232
end
3333

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-
5534
private
5635

5736
def default_version

lib/ruby/openai/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Ruby
22
module OpenAI
3-
VERSION = "0.3.0".freeze
3+
VERSION = "1.0.0".freeze
44
end
55
end

0 commit comments

Comments
 (0)