Skip to content

Commit e1f0653

Browse files
authored
Merge pull request #56 from A-Baji/dev
3.1.0
2 parents c443200 + 196e0ab commit e1f0653

File tree

5 files changed

+82
-61
lines changed

5 files changed

+82
-61
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.
44

5+
## [3.1.0] - 07-21-2024
6+
7+
### Added
8+
9+
- support for the new gpt4o mini model in gpt commands and made it the default model
10+
511
## [3.0.2] - 07-16-2024
612

713
### Fixed
@@ -125,6 +131,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
125131

126132
- modified readme
127133

134+
[3.1.0]: https://github.com/A-Baji/discordAI/compare/3.0.2...3.1.0
128135
[3.0.2]: https://github.com/A-Baji/discordAI/compare/3.0.1...3.0.2
129136
[3.0.1]: https://github.com/A-Baji/discordAI/compare/3.0.0...3.0.1
130137
[3.0.0]: https://github.com/A-Baji/discordAI/compare/2.0.1...3.0.0

discordai/bot/cogs/chatgpt.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
class ChatGPT(commands.Cog, name="chatgpt"):
17-
models = Literal["gpt-3.5-turbo", "gpt-4o", "gpt-4-turbo"]
17+
models = Literal["gpt-4o-mini", "gpt-3.5-turbo", "gpt-4o", "gpt-4-turbo"]
1818

1919
def __init__(self, bot):
2020
self.bot = bot
@@ -25,7 +25,7 @@ def __init__(self, bot):
2525
)
2626
@app_commands.describe(
2727
prompt="The prompt to pass in",
28-
model="Listed by cost: Default=gpt-3.5-turbo",
28+
model="Listed by cost: Default=gpt-4o-mini",
2929
temp="Number between 0.0 and 2.0. Higher values means more risks: Min=0.0 Max=2.0 Default=1.0",
3030
presence_penalty="Number between -2.0 and 2.0. Positive values will encourage new topics: Min=-2.0 Max=2.0 Default=0.0",
3131
frequency_penalty="Number between -2.0 and 2.0. Positive values will encourage new words: Min=-2.0 Max=2.0 Default=0.0",
@@ -35,7 +35,7 @@ async def chatgpt(
3535
self,
3636
context: Context,
3737
prompt: str,
38-
model: models = "gpt-3.5-turbo",
38+
model: models = "gpt-4o-mini",
3939
temp: float = 1.0,
4040
presence_penalty: float = 0.0,
4141
frequency_penalty: float = 0.0,

discordai/bot/cogs/openai.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
class OpenAI(commands.Cog, name="openai"):
17-
models = Literal["gpt-3.5-turbo", "gpt-4o", "gpt-4-turbo"]
17+
models = Literal["gpt-4o-mini", "gpt-3.5-turbo", "gpt-4o", "gpt-4-turbo"]
1818

1919
def __init__(self, bot):
2020
self.bot = bot
@@ -25,7 +25,7 @@ def __init__(self, bot):
2525
)
2626
@app_commands.describe(
2727
prompt="The prompt to pass in",
28-
model="Listed by cost: Default=gpt-3.5-turbo",
28+
model="Listed by cost: Default=gpt-4o-mini",
2929
temp="Number between 0.0 and 2.0. Higher values means more risks: Min=0.0 Max=2.0 Default=1.0",
3030
presence_penalty="Number between -2.0 and 2.0. Positive values will encourage new topics: Min=-2.0 Max=2.0 Default=0.0",
3131
frequency_penalty="Number between -2.0 and 2.0. Positive values will encourage new words: Min=-2.0 Max=2.0 Default=0.0",
@@ -35,7 +35,7 @@ async def openai(
3535
self,
3636
context: Context,
3737
prompt: str,
38-
model: models = "gpt-3.5-turbo",
38+
model: models = "gpt-4o-mini",
3939
temp: float = 1.0,
4040
presence_penalty: float = 0.0,
4141
frequency_penalty: float = 0.0,

discordai/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.0.2"
1+
__version__ = "3.1.0"

tests/expected_values.py

Lines changed: 68 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
11
list_module_expected = [
22
{"id": "dall-e-3", "created": "2023-10-31 20:46:29"},
33
{"id": "whisper-1", "created": "2023-02-27 21:13:04"},
4-
{"id": "tts-1", "created": "2023-04-19 21:49:11"},
4+
{"id": "gpt-4-turbo-2024-04-09", "created": "2024-04-08 18:41:17"},
5+
{"id": "gpt-4-1106-preview", "created": "2023-11-02 20:33:26"},
56
{"id": "dall-e-2", "created": "2023-11-01 00:22:57"},
7+
{"id": "gpt-4-turbo", "created": "2024-04-05 23:57:21"},
68
{"id": "tts-1-hd-1106", "created": "2023-11-03 23:18:53"},
79
{"id": "tts-1-hd", "created": "2023-11-03 21:13:35"},
8-
{"id": "gpt-4-turbo-2024-04-09", "created": "2024-04-08 18:41:17"},
9-
{"id": "gpt-4-turbo", "created": "2024-04-05 23:57:21"},
10-
{"id": "gpt-4-0613", "created": "2023-06-12 16:54:56"},
11-
{"id": "gpt-4o-2024-05-13", "created": "2024-05-10 19:08:52"},
10+
{"id": "gpt-4-turbo-preview", "created": "2024-01-23 19:22:57"},
11+
{"id": "tts-1", "created": "2023-04-19 21:49:11"},
12+
{"id": "babbage-002", "created": "2023-08-21 16:16:55"},
1213
{"id": "gpt-4-0125-preview", "created": "2024-01-23 19:20:12"},
13-
{"id": "gpt-4", "created": "2023-06-27 16:13:31"},
14+
{"id": "gpt-4o-2024-05-13", "created": "2024-05-10 19:08:52"},
1415
{"id": "text-embedding-3-small", "created": "2024-01-22 18:43:17"},
15-
{"id": "gpt-4-turbo-preview", "created": "2024-01-23 19:22:57"},
1616
{"id": "text-embedding-3-large", "created": "2024-01-22 19:53:00"},
17-
{"id": "babbage-002", "created": "2023-08-21 16:16:55"},
18-
{"id": "gpt-4-1106-preview", "created": "2023-11-02 20:33:26"},
19-
{"id": "gpt-3.5-turbo-0125", "created": "2024-01-23 22:19:18"},
2017
{"id": "tts-1-1106", "created": "2023-11-03 23:14:01"},
18+
{"id": "gpt-4o-mini-2024-07-18", "created": "2024-07-16 23:31:57"},
19+
{"id": "gpt-4o-mini", "created": "2024-07-16 23:32:21"},
2120
{"id": "gpt-3.5-turbo", "created": "2023-02-28 18:56:42"},
2221
{"id": "gpt-3.5-turbo-instruct", "created": "2023-08-24 18:23:47"},
2322
{"id": "gpt-3.5-turbo-instruct-0914", "created": "2023-09-07 21:34:32"},
24-
{"id": "gpt-3.5-turbo-1106", "created": "2023-11-02 21:15:48"},
2523
{"id": "text-embedding-ada-002", "created": "2022-12-16 19:01:39"},
2624
{"id": "gpt-3.5-turbo-16k", "created": "2023-05-10 22:35:02"},
2725
{"id": "davinci-002", "created": "2023-08-21 16:11:41"},
26+
{"id": "gpt-3.5-turbo-0125", "created": "2024-01-23 22:19:18"},
27+
{"id": "gpt-3.5-turbo-1106", "created": "2023-11-02 21:15:48"},
28+
{"id": "gpt-4-0613", "created": "2023-06-12 16:54:56"},
2829
{"id": "gpt-4o", "created": "2024-05-10 18:50:49"},
30+
{"id": "gpt-4", "created": "2023-06-27 16:13:31"},
2931
{
3032
"id": "davinci:ft-personal:jason-9582-2022-12-23-05-45-51",
3133
"created": "2022-12-23 05:45:51",
@@ -282,10 +284,16 @@
282284
"owned_by": "openai-internal",
283285
},
284286
{
285-
"id": "tts-1",
286-
"created": "2023-04-19 21:49:11",
287+
"id": "gpt-4-turbo-2024-04-09",
288+
"created": "2024-04-08 18:41:17",
287289
"object": "model",
288-
"owned_by": "openai-internal",
290+
"owned_by": "system",
291+
},
292+
{
293+
"id": "gpt-4-1106-preview",
294+
"created": "2023-11-02 20:33:26",
295+
"object": "model",
296+
"owned_by": "system",
289297
},
290298
{
291299
"id": "dall-e-2",
@@ -294,38 +302,38 @@
294302
"owned_by": "system",
295303
},
296304
{
297-
"id": "tts-1-hd-1106",
298-
"created": "2023-11-03 23:18:53",
305+
"id": "gpt-4-turbo",
306+
"created": "2024-04-05 23:57:21",
299307
"object": "model",
300308
"owned_by": "system",
301309
},
302310
{
303-
"id": "tts-1-hd",
304-
"created": "2023-11-03 21:13:35",
311+
"id": "tts-1-hd-1106",
312+
"created": "2023-11-03 23:18:53",
305313
"object": "model",
306314
"owned_by": "system",
307315
},
308316
{
309-
"id": "gpt-4-turbo-2024-04-09",
310-
"created": "2024-04-08 18:41:17",
317+
"id": "tts-1-hd",
318+
"created": "2023-11-03 21:13:35",
311319
"object": "model",
312320
"owned_by": "system",
313321
},
314322
{
315-
"id": "gpt-4-turbo",
316-
"created": "2024-04-05 23:57:21",
323+
"id": "gpt-4-turbo-preview",
324+
"created": "2024-01-23 19:22:57",
317325
"object": "model",
318326
"owned_by": "system",
319327
},
320328
{
321-
"id": "gpt-4-0613",
322-
"created": "2023-06-12 16:54:56",
329+
"id": "tts-1",
330+
"created": "2023-04-19 21:49:11",
323331
"object": "model",
324-
"owned_by": "openai",
332+
"owned_by": "openai-internal",
325333
},
326334
{
327-
"id": "gpt-4o-2024-05-13",
328-
"created": "2024-05-10 19:08:52",
335+
"id": "babbage-002",
336+
"created": "2023-08-21 16:16:55",
329337
"object": "model",
330338
"owned_by": "system",
331339
},
@@ -336,50 +344,38 @@
336344
"owned_by": "system",
337345
},
338346
{
339-
"id": "gpt-4",
340-
"created": "2023-06-27 16:13:31",
347+
"id": "gpt-4o-2024-05-13",
348+
"created": "2024-05-10 19:08:52",
341349
"object": "model",
342-
"owned_by": "openai",
350+
"owned_by": "system",
343351
},
344352
{
345353
"id": "text-embedding-3-small",
346354
"created": "2024-01-22 18:43:17",
347355
"object": "model",
348356
"owned_by": "system",
349357
},
350-
{
351-
"id": "gpt-4-turbo-preview",
352-
"created": "2024-01-23 19:22:57",
353-
"object": "model",
354-
"owned_by": "system",
355-
},
356358
{
357359
"id": "text-embedding-3-large",
358360
"created": "2024-01-22 19:53:00",
359361
"object": "model",
360362
"owned_by": "system",
361363
},
362364
{
363-
"id": "babbage-002",
364-
"created": "2023-08-21 16:16:55",
365-
"object": "model",
366-
"owned_by": "system",
367-
},
368-
{
369-
"id": "gpt-4-1106-preview",
370-
"created": "2023-11-02 20:33:26",
365+
"id": "tts-1-1106",
366+
"created": "2023-11-03 23:14:01",
371367
"object": "model",
372368
"owned_by": "system",
373369
},
374370
{
375-
"id": "gpt-3.5-turbo-0125",
376-
"created": "2024-01-23 22:19:18",
371+
"id": "gpt-4o-mini-2024-07-18",
372+
"created": "2024-07-16 23:31:57",
377373
"object": "model",
378374
"owned_by": "system",
379375
},
380376
{
381-
"id": "tts-1-1106",
382-
"created": "2023-11-03 23:14:01",
377+
"id": "gpt-4o-mini",
378+
"created": "2024-07-16 23:32:21",
383379
"object": "model",
384380
"owned_by": "system",
385381
},
@@ -401,12 +397,6 @@
401397
"object": "model",
402398
"owned_by": "system",
403399
},
404-
{
405-
"id": "gpt-3.5-turbo-1106",
406-
"created": "2023-11-02 21:15:48",
407-
"object": "model",
408-
"owned_by": "system",
409-
},
410400
{
411401
"id": "text-embedding-ada-002",
412402
"created": "2022-12-16 19:01:39",
@@ -425,12 +415,36 @@
425415
"object": "model",
426416
"owned_by": "system",
427417
},
418+
{
419+
"id": "gpt-3.5-turbo-0125",
420+
"created": "2024-01-23 22:19:18",
421+
"object": "model",
422+
"owned_by": "system",
423+
},
424+
{
425+
"id": "gpt-3.5-turbo-1106",
426+
"created": "2023-11-02 21:15:48",
427+
"object": "model",
428+
"owned_by": "system",
429+
},
430+
{
431+
"id": "gpt-4-0613",
432+
"created": "2023-06-12 16:54:56",
433+
"object": "model",
434+
"owned_by": "openai",
435+
},
428436
{
429437
"id": "gpt-4o",
430438
"created": "2024-05-10 18:50:49",
431439
"object": "model",
432440
"owned_by": "system",
433441
},
442+
{
443+
"id": "gpt-4",
444+
"created": "2023-06-27 16:13:31",
445+
"object": "model",
446+
"owned_by": "openai",
447+
},
434448
{
435449
"id": "davinci:ft-personal:jason-9582-2022-12-23-05-45-51",
436450
"created": "2022-12-23 05:45:51",

0 commit comments

Comments
 (0)