openai_101 1.2.4 → 1.2.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: 79f63641cbdb6de624c2114e414d89b19c74ff54cce75f12a7933da1e3bf794c
4
- data.tar.gz: aeb198288206c3bb986e5857f5697ee0214d570040380ab6b8aeb00d8f7d2b62
3
+ metadata.gz: eb3493178c55c0286c26dd0c32de1ba55ebb5a8634bc2022da8c07163e5a7c38
4
+ data.tar.gz: e9e00c37245f0050270f73ef65a59d737412a708147a8d36fa0f29ff29aa8903
5
5
  SHA512:
6
- metadata.gz: 10f327aa5411a2bacedf94f59ce457e2b7a6ee47e3b92aebbae8ade218ded0c38f65043e18d1500c5a7ebc29292a1fcc4cd4eedb56ae240d717d07b625dcf5db
7
- data.tar.gz: d5178938b8faf8b7a2c54d9a1fe04c2b8618264934dc8e9a59650f3b39203ba60bb269b481d20d8de6605bf8b07bf0a6d4a4092a045fd5a9f66f519b98476f9a
6
+ metadata.gz: f36ea8ec19ff3e905aaf8417e401c725b03ced9cc5a1d444a0b288694746210de2ee84c0ea3c3dc11975255aa695fe54565d30ea0e239bbe20aac1e18018ccc9
7
+ data.tar.gz: febb6375a6ffd981c90045a669511c1aadf43ec50bf144344ad36d214b05071e81129552ad16b1edddef2abe46438c6f8e3870e120ae1206006e68792222babd
data/.rubocop.yml CHANGED
@@ -101,7 +101,10 @@ RSpec/NestedGroups:
101
101
 
102
102
  RSpec/SpecFilePathFormat:
103
103
  Enabled: true
104
-
104
+ RSpec/DescribeClass:
105
+ Enabled: false
106
+ RSpec/NoExpectationExample:
107
+ Enabled: false
105
108
  RSpec/SpecFilePathSuffix:
106
109
  Enabled: true
107
110
 
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [1.2.4](https://github.com/appydave/openai_101/compare/v1.2.3...v1.2.4) (2024-06-19)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * preperation for the completions API (legacy) ([1d88a79](https://github.com/appydave/openai_101/commit/1d88a799aaa489de107ae22f0033316aabb754f1))
7
+ * preperation for the completions API (legacy) ([c0be6cf](https://github.com/appydave/openai_101/commit/c0be6cf3fdd2431e9ec3b1254c4879ad667efa13))
8
+ * update cops ([e6fb01a](https://github.com/appydave/openai_101/commit/e6fb01a07eb4864f1eeab5cbf9975524274462a6))
9
+
1
10
  ## [1.2.3](https://github.com/appydave/openai_101/compare/v1.2.2...v1.2.3) (2024-06-19)
2
11
 
3
12
 
Binary file
Binary file
Binary file
@@ -10,6 +10,7 @@ OpenAI.configure do |config|
10
10
  if tools_enabled == 'true'
11
11
  config.access_token = ENV.fetch('OPENAI_ACCESS_TOKEN')
12
12
  config.organization_id = ENV.fetch('OPENAI_ORGANIZATION_ID', nil)
13
+ config.log_errors = true
13
14
  end
14
15
 
15
16
  puts "Initializing OpenAI with tools #{tools_enabled == 'true' ? 'enabled' : 'disabled'}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Openai101
4
- VERSION = '1.2.4'
4
+ VERSION = '1.2.5'
5
5
  end
data/models.json ADDED
@@ -0,0 +1,293 @@
1
+ {
2
+ "object": "list",
3
+ "data": [
4
+ {
5
+ "id": "gpt-3.5-turbo-0613",
6
+ "object": "model",
7
+ "created": 1686587434,
8
+ "owned_by": "openai"
9
+ },
10
+ {
11
+ "id": "whisper-1",
12
+ "object": "model",
13
+ "created": 1677532384,
14
+ "owned_by": "openai-internal"
15
+ },
16
+ {
17
+ "id": "babbage-002",
18
+ "object": "model",
19
+ "created": 1692634615,
20
+ "owned_by": "system"
21
+ },
22
+ {
23
+ "id": "dall-e-2",
24
+ "object": "model",
25
+ "created": 1698798177,
26
+ "owned_by": "system"
27
+ },
28
+ {
29
+ "id": "gpt-3.5-turbo-16k",
30
+ "object": "model",
31
+ "created": 1683758102,
32
+ "owned_by": "openai-internal"
33
+ },
34
+ {
35
+ "id": "tts-1-hd-1106",
36
+ "object": "model",
37
+ "created": 1699053533,
38
+ "owned_by": "system"
39
+ },
40
+ {
41
+ "id": "tts-1-hd",
42
+ "object": "model",
43
+ "created": 1699046015,
44
+ "owned_by": "system"
45
+ },
46
+ {
47
+ "id": "gpt-4-turbo-2024-04-09",
48
+ "object": "model",
49
+ "created": 1712601677,
50
+ "owned_by": "system"
51
+ },
52
+ {
53
+ "id": "gpt-4-0125-preview",
54
+ "object": "model",
55
+ "created": 1706037612,
56
+ "owned_by": "system"
57
+ },
58
+ {
59
+ "id": "gpt-3.5-turbo",
60
+ "object": "model",
61
+ "created": 1677610602,
62
+ "owned_by": "openai"
63
+ },
64
+ {
65
+ "id": "gpt-4-turbo-preview",
66
+ "object": "model",
67
+ "created": 1706037777,
68
+ "owned_by": "system"
69
+ },
70
+ {
71
+ "id": "gpt-4-turbo",
72
+ "object": "model",
73
+ "created": 1712361441,
74
+ "owned_by": "system"
75
+ },
76
+ {
77
+ "id": "gpt-3.5-turbo-instruct-0914",
78
+ "object": "model",
79
+ "created": 1694122472,
80
+ "owned_by": "system"
81
+ },
82
+ {
83
+ "id": "gpt-4o",
84
+ "object": "model",
85
+ "created": 1715367049,
86
+ "owned_by": "system"
87
+ },
88
+ {
89
+ "id": "gpt-3.5-turbo-instruct",
90
+ "object": "model",
91
+ "created": 1692901427,
92
+ "owned_by": "system"
93
+ },
94
+ {
95
+ "id": "text-embedding-3-small",
96
+ "object": "model",
97
+ "created": 1705948997,
98
+ "owned_by": "system"
99
+ },
100
+ {
101
+ "id": "tts-1",
102
+ "object": "model",
103
+ "created": 1681940951,
104
+ "owned_by": "openai-internal"
105
+ },
106
+ {
107
+ "id": "gpt-4",
108
+ "object": "model",
109
+ "created": 1687882411,
110
+ "owned_by": "openai"
111
+ },
112
+ {
113
+ "id": "text-embedding-3-large",
114
+ "object": "model",
115
+ "created": 1705953180,
116
+ "owned_by": "system"
117
+ },
118
+ {
119
+ "id": "gpt-4-1106-preview",
120
+ "object": "model",
121
+ "created": 1698957206,
122
+ "owned_by": "system"
123
+ },
124
+ {
125
+ "id": "gpt-4-0613",
126
+ "object": "model",
127
+ "created": 1686588896,
128
+ "owned_by": "openai"
129
+ },
130
+ {
131
+ "id": "gpt-3.5-turbo-0125",
132
+ "object": "model",
133
+ "created": 1706048358,
134
+ "owned_by": "system"
135
+ },
136
+ {
137
+ "id": "tts-1-1106",
138
+ "object": "model",
139
+ "created": 1699053241,
140
+ "owned_by": "system"
141
+ },
142
+ {
143
+ "id": "dall-e-3",
144
+ "object": "model",
145
+ "created": 1698785189,
146
+ "owned_by": "system"
147
+ },
148
+ {
149
+ "id": "text-embedding-ada-002",
150
+ "object": "model",
151
+ "created": 1671217299,
152
+ "owned_by": "openai-internal"
153
+ },
154
+ {
155
+ "id": "gpt-4-32k-0314",
156
+ "object": "model",
157
+ "created": 1687979321,
158
+ "owned_by": "openai"
159
+ },
160
+ {
161
+ "id": "davinci-002",
162
+ "object": "model",
163
+ "created": 1692634301,
164
+ "owned_by": "system"
165
+ },
166
+ {
167
+ "id": "gpt-3.5-turbo-1106",
168
+ "object": "model",
169
+ "created": 1698959748,
170
+ "owned_by": "system"
171
+ },
172
+ {
173
+ "id": "gpt-4o-2024-05-13",
174
+ "object": "model",
175
+ "created": 1715368132,
176
+ "owned_by": "system"
177
+ },
178
+ {
179
+ "id": "gpt-3.5-turbo-16k-0613",
180
+ "object": "model",
181
+ "created": 1685474247,
182
+ "owned_by": "openai"
183
+ },
184
+ {
185
+ "id": "gpt-4-0314",
186
+ "object": "model",
187
+ "created": 1687882410,
188
+ "owned_by": "openai"
189
+ },
190
+ {
191
+ "id": "gpt-3.5-turbo-0301",
192
+ "object": "model",
193
+ "created": 1677649963,
194
+ "owned_by": "openai"
195
+ },
196
+ {
197
+ "id": "davinci:ft-print-speak-2023-08-20-04-31-59",
198
+ "object": "model",
199
+ "created": 1692505920,
200
+ "owned_by": "print-speak"
201
+ },
202
+ {
203
+ "id": "davinci:ft-print-speak-2023-08-20-20-34-58",
204
+ "object": "model",
205
+ "created": 1692563698,
206
+ "owned_by": "print-speak"
207
+ },
208
+ {
209
+ "id": "davinci:ft-print-speak-2023-08-26-08-48-11",
210
+ "object": "model",
211
+ "created": 1693039691,
212
+ "owned_by": "print-speak"
213
+ },
214
+ {
215
+ "id": "davinci:ft-print-speak-2023-08-26-13-12-53",
216
+ "object": "model",
217
+ "created": 1693055573,
218
+ "owned_by": "print-speak"
219
+ },
220
+ {
221
+ "id": "davinci:ft-print-speak-2023-08-26-13-22-02",
222
+ "object": "model",
223
+ "created": 1693056122,
224
+ "owned_by": "print-speak"
225
+ },
226
+ {
227
+ "id": "davinci:ft-print-speak-2023-08-26-13-31-20",
228
+ "object": "model",
229
+ "created": 1693056680,
230
+ "owned_by": "print-speak"
231
+ },
232
+ {
233
+ "id": "davinci:ft-print-speak-2023-08-26-13-40-58",
234
+ "object": "model",
235
+ "created": 1693057258,
236
+ "owned_by": "print-speak"
237
+ },
238
+ {
239
+ "id": "davinci:ft-print-speak-2023-08-26-13-50-55",
240
+ "object": "model",
241
+ "created": 1693057855,
242
+ "owned_by": "print-speak"
243
+ },
244
+ {
245
+ "id": "davinci:ft-print-speak-2023-08-26-14-19-45",
246
+ "object": "model",
247
+ "created": 1693059585,
248
+ "owned_by": "print-speak"
249
+ },
250
+ {
251
+ "id": "davinci:ft-print-speak-2023-08-27-03-14-18",
252
+ "object": "model",
253
+ "created": 1693106058,
254
+ "owned_by": "print-speak"
255
+ },
256
+ {
257
+ "id": "davinci:ft-print-speak-2023-08-27-03-21-24",
258
+ "object": "model",
259
+ "created": 1693106484,
260
+ "owned_by": "print-speak"
261
+ },
262
+ {
263
+ "id": "davinci:ft-print-speak-2023-08-27-03-30-25",
264
+ "object": "model",
265
+ "created": 1693107026,
266
+ "owned_by": "print-speak"
267
+ },
268
+ {
269
+ "id": "davinci:ft-print-speak-2023-08-27-03-37-34",
270
+ "object": "model",
271
+ "created": 1693107455,
272
+ "owned_by": "print-speak"
273
+ },
274
+ {
275
+ "id": "davinci:ft-print-speak-2023-08-27-03-45-56",
276
+ "object": "model",
277
+ "created": 1693107956,
278
+ "owned_by": "print-speak"
279
+ },
280
+ {
281
+ "id": "davinci:ft-print-speak-2023-08-27-04-13-40",
282
+ "object": "model",
283
+ "created": 1693109620,
284
+ "owned_by": "print-speak"
285
+ },
286
+ {
287
+ "id": "davinci:ft-print-speak-2023-08-27-04-16-52",
288
+ "object": "model",
289
+ "created": 1693109812,
290
+ "owned_by": "print-speak"
291
+ }
292
+ ]
293
+ }
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "openai_101",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "openai_101",
9
- "version": "1.2.4",
9
+ "version": "1.2.5",
10
10
  "devDependencies": {
11
11
  "@klueless-js/semantic-release-rubygem": "github:klueless-js/semantic-release-rubygem",
12
12
  "@semantic-release/changelog": "^6.0.3",
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openai_101",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "OpenAI 101 working through the API endpoints",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openai_101
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: bigdecimal
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '3'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: clipboard
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -98,14 +98,14 @@ dependencies:
98
98
  name: mutex_m
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '7'
125
+ - !ruby/object:Gem::Dependency
126
+ name: table_print
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '1'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '1'
125
139
  description: " OpenAI 101 working through the API endpoints\n"
126
140
  email:
127
141
  - david@ideasmen.com.au
@@ -146,6 +160,9 @@ files:
146
160
  - bin/console
147
161
  - bin/setup
148
162
  - config/openai-cost.json
163
+ - course/01-1-completion-code.png
164
+ - course/01-2-completion-before.png
165
+ - course/01-3-completion-after.png
149
166
  - lib/openai101/initializer.rb
150
167
  - lib/openai101/models/completion_params.rb
151
168
  - lib/openai101/types/array_type.rb
@@ -155,6 +172,7 @@ files:
155
172
  - lib/openai101/usecases/token_counter.rb
156
173
  - lib/openai101/version.rb
157
174
  - lib/openai_101.rb
175
+ - models.json
158
176
  - package-lock.json
159
177
  - package.json
160
178
  - sig/openai_101.rbs