Skip to content

Commit

Permalink
Merge pull request #56 from A-Baji/dev
Browse files Browse the repository at this point in the history
3.1.0
  • Loading branch information
A-Baji authored Jul 21, 2024
2 parents c443200 + 196e0ab commit e1f0653
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 61 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

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

## [3.1.0] - 07-21-2024

### Added

- support for the new gpt4o mini model in gpt commands and made it the default model

## [3.0.2] - 07-16-2024

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

- modified readme

[3.1.0]: https://github.com/A-Baji/discordAI/compare/3.0.2...3.1.0
[3.0.2]: https://github.com/A-Baji/discordAI/compare/3.0.1...3.0.2
[3.0.1]: https://github.com/A-Baji/discordAI/compare/3.0.0...3.0.1
[3.0.0]: https://github.com/A-Baji/discordAI/compare/2.0.1...3.0.0
Expand Down
6 changes: 3 additions & 3 deletions discordai/bot/cogs/chatgpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


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

def __init__(self, bot):
self.bot = bot
Expand All @@ -25,7 +25,7 @@ def __init__(self, bot):
)
@app_commands.describe(
prompt="The prompt to pass in",
model="Listed by cost: Default=gpt-3.5-turbo",
model="Listed by cost: Default=gpt-4o-mini",
temp="Number between 0.0 and 2.0. Higher values means more risks: Min=0.0 Max=2.0 Default=1.0",
presence_penalty="Number between -2.0 and 2.0. Positive values will encourage new topics: Min=-2.0 Max=2.0 Default=0.0",
frequency_penalty="Number between -2.0 and 2.0. Positive values will encourage new words: Min=-2.0 Max=2.0 Default=0.0",
Expand All @@ -35,7 +35,7 @@ async def chatgpt(
self,
context: Context,
prompt: str,
model: models = "gpt-3.5-turbo",
model: models = "gpt-4o-mini",
temp: float = 1.0,
presence_penalty: float = 0.0,
frequency_penalty: float = 0.0,
Expand Down
6 changes: 3 additions & 3 deletions discordai/bot/cogs/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


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

def __init__(self, bot):
self.bot = bot
Expand All @@ -25,7 +25,7 @@ def __init__(self, bot):
)
@app_commands.describe(
prompt="The prompt to pass in",
model="Listed by cost: Default=gpt-3.5-turbo",
model="Listed by cost: Default=gpt-4o-mini",
temp="Number between 0.0 and 2.0. Higher values means more risks: Min=0.0 Max=2.0 Default=1.0",
presence_penalty="Number between -2.0 and 2.0. Positive values will encourage new topics: Min=-2.0 Max=2.0 Default=0.0",
frequency_penalty="Number between -2.0 and 2.0. Positive values will encourage new words: Min=-2.0 Max=2.0 Default=0.0",
Expand All @@ -35,7 +35,7 @@ async def openai(
self,
context: Context,
prompt: str,
model: models = "gpt-3.5-turbo",
model: models = "gpt-4o-mini",
temp: float = 1.0,
presence_penalty: float = 0.0,
frequency_penalty: float = 0.0,
Expand Down
2 changes: 1 addition & 1 deletion discordai/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.0.2"
__version__ = "3.1.0"
122 changes: 68 additions & 54 deletions tests/expected_values.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
list_module_expected = [
{"id": "dall-e-3", "created": "2023-10-31 20:46:29"},
{"id": "whisper-1", "created": "2023-02-27 21:13:04"},
{"id": "tts-1", "created": "2023-04-19 21:49:11"},
{"id": "gpt-4-turbo-2024-04-09", "created": "2024-04-08 18:41:17"},
{"id": "gpt-4-1106-preview", "created": "2023-11-02 20:33:26"},
{"id": "dall-e-2", "created": "2023-11-01 00:22:57"},
{"id": "gpt-4-turbo", "created": "2024-04-05 23:57:21"},
{"id": "tts-1-hd-1106", "created": "2023-11-03 23:18:53"},
{"id": "tts-1-hd", "created": "2023-11-03 21:13:35"},
{"id": "gpt-4-turbo-2024-04-09", "created": "2024-04-08 18:41:17"},
{"id": "gpt-4-turbo", "created": "2024-04-05 23:57:21"},
{"id": "gpt-4-0613", "created": "2023-06-12 16:54:56"},
{"id": "gpt-4o-2024-05-13", "created": "2024-05-10 19:08:52"},
{"id": "gpt-4-turbo-preview", "created": "2024-01-23 19:22:57"},
{"id": "tts-1", "created": "2023-04-19 21:49:11"},
{"id": "babbage-002", "created": "2023-08-21 16:16:55"},
{"id": "gpt-4-0125-preview", "created": "2024-01-23 19:20:12"},
{"id": "gpt-4", "created": "2023-06-27 16:13:31"},
{"id": "gpt-4o-2024-05-13", "created": "2024-05-10 19:08:52"},
{"id": "text-embedding-3-small", "created": "2024-01-22 18:43:17"},
{"id": "gpt-4-turbo-preview", "created": "2024-01-23 19:22:57"},
{"id": "text-embedding-3-large", "created": "2024-01-22 19:53:00"},
{"id": "babbage-002", "created": "2023-08-21 16:16:55"},
{"id": "gpt-4-1106-preview", "created": "2023-11-02 20:33:26"},
{"id": "gpt-3.5-turbo-0125", "created": "2024-01-23 22:19:18"},
{"id": "tts-1-1106", "created": "2023-11-03 23:14:01"},
{"id": "gpt-4o-mini-2024-07-18", "created": "2024-07-16 23:31:57"},
{"id": "gpt-4o-mini", "created": "2024-07-16 23:32:21"},
{"id": "gpt-3.5-turbo", "created": "2023-02-28 18:56:42"},
{"id": "gpt-3.5-turbo-instruct", "created": "2023-08-24 18:23:47"},
{"id": "gpt-3.5-turbo-instruct-0914", "created": "2023-09-07 21:34:32"},
{"id": "gpt-3.5-turbo-1106", "created": "2023-11-02 21:15:48"},
{"id": "text-embedding-ada-002", "created": "2022-12-16 19:01:39"},
{"id": "gpt-3.5-turbo-16k", "created": "2023-05-10 22:35:02"},
{"id": "davinci-002", "created": "2023-08-21 16:11:41"},
{"id": "gpt-3.5-turbo-0125", "created": "2024-01-23 22:19:18"},
{"id": "gpt-3.5-turbo-1106", "created": "2023-11-02 21:15:48"},
{"id": "gpt-4-0613", "created": "2023-06-12 16:54:56"},
{"id": "gpt-4o", "created": "2024-05-10 18:50:49"},
{"id": "gpt-4", "created": "2023-06-27 16:13:31"},
{
"id": "davinci:ft-personal:jason-9582-2022-12-23-05-45-51",
"created": "2022-12-23 05:45:51",
Expand Down Expand Up @@ -282,10 +284,16 @@
"owned_by": "openai-internal",
},
{
"id": "tts-1",
"created": "2023-04-19 21:49:11",
"id": "gpt-4-turbo-2024-04-09",
"created": "2024-04-08 18:41:17",
"object": "model",
"owned_by": "openai-internal",
"owned_by": "system",
},
{
"id": "gpt-4-1106-preview",
"created": "2023-11-02 20:33:26",
"object": "model",
"owned_by": "system",
},
{
"id": "dall-e-2",
Expand All @@ -294,38 +302,38 @@
"owned_by": "system",
},
{
"id": "tts-1-hd-1106",
"created": "2023-11-03 23:18:53",
"id": "gpt-4-turbo",
"created": "2024-04-05 23:57:21",
"object": "model",
"owned_by": "system",
},
{
"id": "tts-1-hd",
"created": "2023-11-03 21:13:35",
"id": "tts-1-hd-1106",
"created": "2023-11-03 23:18:53",
"object": "model",
"owned_by": "system",
},
{
"id": "gpt-4-turbo-2024-04-09",
"created": "2024-04-08 18:41:17",
"id": "tts-1-hd",
"created": "2023-11-03 21:13:35",
"object": "model",
"owned_by": "system",
},
{
"id": "gpt-4-turbo",
"created": "2024-04-05 23:57:21",
"id": "gpt-4-turbo-preview",
"created": "2024-01-23 19:22:57",
"object": "model",
"owned_by": "system",
},
{
"id": "gpt-4-0613",
"created": "2023-06-12 16:54:56",
"id": "tts-1",
"created": "2023-04-19 21:49:11",
"object": "model",
"owned_by": "openai",
"owned_by": "openai-internal",
},
{
"id": "gpt-4o-2024-05-13",
"created": "2024-05-10 19:08:52",
"id": "babbage-002",
"created": "2023-08-21 16:16:55",
"object": "model",
"owned_by": "system",
},
Expand All @@ -336,50 +344,38 @@
"owned_by": "system",
},
{
"id": "gpt-4",
"created": "2023-06-27 16:13:31",
"id": "gpt-4o-2024-05-13",
"created": "2024-05-10 19:08:52",
"object": "model",
"owned_by": "openai",
"owned_by": "system",
},
{
"id": "text-embedding-3-small",
"created": "2024-01-22 18:43:17",
"object": "model",
"owned_by": "system",
},
{
"id": "gpt-4-turbo-preview",
"created": "2024-01-23 19:22:57",
"object": "model",
"owned_by": "system",
},
{
"id": "text-embedding-3-large",
"created": "2024-01-22 19:53:00",
"object": "model",
"owned_by": "system",
},
{
"id": "babbage-002",
"created": "2023-08-21 16:16:55",
"object": "model",
"owned_by": "system",
},
{
"id": "gpt-4-1106-preview",
"created": "2023-11-02 20:33:26",
"id": "tts-1-1106",
"created": "2023-11-03 23:14:01",
"object": "model",
"owned_by": "system",
},
{
"id": "gpt-3.5-turbo-0125",
"created": "2024-01-23 22:19:18",
"id": "gpt-4o-mini-2024-07-18",
"created": "2024-07-16 23:31:57",
"object": "model",
"owned_by": "system",
},
{
"id": "tts-1-1106",
"created": "2023-11-03 23:14:01",
"id": "gpt-4o-mini",
"created": "2024-07-16 23:32:21",
"object": "model",
"owned_by": "system",
},
Expand All @@ -401,12 +397,6 @@
"object": "model",
"owned_by": "system",
},
{
"id": "gpt-3.5-turbo-1106",
"created": "2023-11-02 21:15:48",
"object": "model",
"owned_by": "system",
},
{
"id": "text-embedding-ada-002",
"created": "2022-12-16 19:01:39",
Expand All @@ -425,12 +415,36 @@
"object": "model",
"owned_by": "system",
},
{
"id": "gpt-3.5-turbo-0125",
"created": "2024-01-23 22:19:18",
"object": "model",
"owned_by": "system",
},
{
"id": "gpt-3.5-turbo-1106",
"created": "2023-11-02 21:15:48",
"object": "model",
"owned_by": "system",
},
{
"id": "gpt-4-0613",
"created": "2023-06-12 16:54:56",
"object": "model",
"owned_by": "openai",
},
{
"id": "gpt-4o",
"created": "2024-05-10 18:50:49",
"object": "model",
"owned_by": "system",
},
{
"id": "gpt-4",
"created": "2023-06-27 16:13:31",
"object": "model",
"owned_by": "openai",
},
{
"id": "davinci:ft-personal:jason-9582-2022-12-23-05-45-51",
"created": "2022-12-23 05:45:51",
Expand Down

0 comments on commit e1f0653

Please sign in to comment.