Skip to content

Commit fd5c5c9

Browse files
authored
Merge pull request #55 from A-Baji/dev
3.0.9
2 parents 0e7def1 + 0a350a9 commit fd5c5c9

File tree

7 files changed

+43
-36
lines changed

7 files changed

+43
-36
lines changed

CHANGELOG.md

Lines changed: 10 additions & 3 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.0.9] - 07-11-2024
6+
7+
### Changed
8+
9+
- consistently capitalize Discord and OpenAI across the project
10+
511
## [3.0.8] - 07-11-2024
612

713
### Changed
@@ -102,7 +108,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
102108
### Changed
103109

104110
- flag to use an existing dataset for model creation to allow manual revision
105-
- user input for model creation updated to work with new discord naming system
111+
- user input for model creation updated to work with new Discord naming system
106112
- tweaked readme
107113

108114
## [1.2.2] - 02-22-2023
@@ -128,18 +134,19 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
128134

129135
### Changed
130136

131-
- replaced `subprocess` instances with appropriate openAI python API methods
137+
- replaced `subprocess` instances with appropriate OpenAI python API methods
132138

133139
### Removed
134140

135-
- dataset clean up step with openAI fine tune API
141+
- dataset clean up step with OpenAI fine tune API
136142

137143
## [1.0.1] - 02-11-2023
138144

139145
### Changed
140146

141147
- switched to `pathlib` for file path parsing
142148

149+
[3.0.9]: https://github.com/A-Baji/discordAI-modelizer/compare/3.0.8...3.0.9
143150
[3.0.8]: https://github.com/A-Baji/discordAI-modelizer/compare/3.0.7...3.0.8
144151
[3.0.7]: https://github.com/A-Baji/discordAI-modelizer/compare/3.0.6...3.0.7
145152
[3.0.6]: https://github.com/A-Baji/discordAI-modelizer/compare/3.0.5...3.0.6

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# DiscordAI Modelizer
2-
DiscordAI Modelizer is a python package that can generate custom openai models based on a discord user's chat history in a discord channel. It uses [DiscordChatExporter](https://github.com/Tyrrrz/DiscordChatExporter) to download the logs of a channel, processes the logs into a usable dataset, and then uses [openAI's API](https://beta.openai.com/docs/introduction) to create a customized model. It also wraps some of the tools from the openAI API to help with managing customizations.
2+
DiscordAI Modelizer is a python package that can generate custom openai models based on a Discord user's chat history in a Discord channel. It uses [DiscordChatExporter](https://github.com/Tyrrrz/DiscordChatExporter) to download the logs of a channel, processes the logs into a usable dataset, and then uses [OpenAI's API](https://beta.openai.com/docs/introduction) to create a customized model. It also wraps some of the tools from the OpenAI API to help with managing customizations.
33

44
DiscordAI Modelizer is primarily used as a subcomponent of [DiscordAI](https://github.com/A-Baji/discordAI), but may also be used independently.
55

@@ -12,24 +12,24 @@ DiscordAI Modelizer is primarily used as a subcomponent of [DiscordAI](https://g
1212

1313
## Commands
1414
### Model
15-
Commands related to your openAI models
15+
Commands related to your OpenAI models
1616
#### `discordai_modelizer model list`
17-
* List your openAI models
17+
* List your OpenAI models
1818
#### `discordai_modelizer model create`
19-
* Create a new openAI customized model by downloading the specified chat logs, parsing them into a usable dataset, and then training a customized model using openai
19+
* Create a new OpenAI customized model by downloading the specified chat logs, parsing them into a usable dataset, and then training a customized model using openai
2020
* For proper usage, see the [DiscordAI guide](https://github.com/A-Baji/discordAI#create-a-new-customized-openai-model)
2121
#### `discordai_modelizer model delete`
22-
* Delete an openAI model
22+
* Delete an OpenAI model
2323
### Job
24-
Commands related to your openAI jobs
24+
Commands related to your OpenAI jobs
2525
#### `discordai_modelizer job list`
26-
* List your openAI customization jobs
26+
* List your OpenAI customization jobs
2727
#### `discordai_modelizer job info`
28-
* Get an openAI customization job's info
28+
* Get an OpenAI customization job's info
2929
#### `discordai_modelizer job event`
30-
* Get an openAI customization job's events
30+
* Get an OpenAI customization job's events
3131
#### `discordai_modelizer job cancel`
32-
* Cancel an openAI customization job
32+
* Cancel an OpenAI customization job
3333

3434
## Disclaimer
3535
This application allows users to download the chat history of any channel for which they have permission to invite a bot, and then use those logs to create an openai model based on a user's chat messages. It is important to note that this application should only be used with the consent of all members of the channel. Using this application for malicious purposes, such as impersonation, or without the consent of all members is strictly prohibited.

discordai_modelizer/command_line/subparsers.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def set_bot_key_help_str(is_parent=False):
88

99
def setup_model_list(model_subcommand, is_parent=False):
1010
model_list = model_subcommand.add_parser(
11-
"list", help="List your openAi customized models"
11+
"list", help="List your OpenAI customized models"
1212
)
1313
model_list_required_named = model_list.add_argument_group(
1414
"required named arguments"
@@ -22,7 +22,7 @@ def setup_model_list(model_subcommand, is_parent=False):
2222
"--openai-key",
2323
type=str,
2424
dest="openai_key",
25-
help=f"The openAI API key to list the models for. Must either be passed in as an argument or set {set_openai_help_str(is_parent)}",
25+
help=f"The OpenAI API key to list the models for. Must either be passed in as an argument or set {set_openai_help_str(is_parent)}",
2626
)
2727
model_list_optional_named.add_argument(
2828
"--full",
@@ -36,7 +36,7 @@ def setup_model_list(model_subcommand, is_parent=False):
3636
def setup_model_create(model_subcommand, is_parent=False):
3737
model_create = model_subcommand.add_parser(
3838
"create",
39-
help="Create a new openAI customized model by downloading the specified chat logs, parsing them into a usable dataset, and then training a customized model using openai",
39+
help="Create a new OpenAI customized model by downloading the specified chat logs, parsing them into a usable dataset, and then training a customized model using openai",
4040
)
4141
model_create_required_named = model_create.add_argument_group(
4242
"required named arguments"
@@ -50,30 +50,30 @@ def setup_model_create(model_subcommand, is_parent=False):
5050
"--discord-token",
5151
type=str,
5252
dest="discord_token",
53-
help=f"The discord token for your bot. Must either be passed in as an argument or set {set_bot_key_help_str(is_parent)}",
53+
help=f"The Discord token for your bot. Must either be passed in as an argument or set {set_bot_key_help_str(is_parent)}",
5454
)
5555
model_create_required_named.add_argument(
5656
"-o",
5757
"--openai-key",
5858
type=str,
5959
dest="openai_key",
60-
help=f"The openAI API key to use to create the model. Must either be passed in as an argument or set {set_openai_help_str(is_parent)}",
60+
help=f"The OpenAI API key to use to create the model. Must either be passed in as an argument or set {set_openai_help_str(is_parent)}",
6161
)
6262
model_create_required_named.add_argument(
6363
"-c",
6464
"--channel",
6565
required=True,
6666
type=str,
6767
dest="channel",
68-
help="The ID of the discord channel you want to use",
68+
help="The ID of the Discord channel you want to use",
6969
)
7070
model_create_required_named.add_argument(
7171
"-u",
7272
"--user",
7373
required=True,
7474
type=str,
7575
dest="user",
76-
help="The unique username of the discord user you want to use",
76+
help="The unique username of the Discord user you want to use",
7777
)
7878

7979
model_create_optional_named.add_argument(
@@ -156,7 +156,7 @@ def setup_model_create(model_subcommand, is_parent=False):
156156
action="store_true",
157157
required=False,
158158
dest="redownload",
159-
help="Redownload the discord chat logs",
159+
help="Redownload the Discord chat logs",
160160
)
161161
model_create_optional_named.add_argument(
162162
"--use_existing",
@@ -170,7 +170,7 @@ def setup_model_create(model_subcommand, is_parent=False):
170170
def setup_model_delete(model_subcommand, is_parent=False):
171171
model_delete = model_subcommand.add_parser(
172172
"delete",
173-
help="Delete an openAI customized model",
173+
help="Delete an OpenAI customized model",
174174
)
175175
model_delete_required_named = model_delete.add_argument_group(
176176
"required named arguments"
@@ -184,7 +184,7 @@ def setup_model_delete(model_subcommand, is_parent=False):
184184
"--openai-key",
185185
type=str,
186186
dest="openai_key",
187-
help=f"The openAI API key associated with the model to delete. Must either be passed in as an argument or set {set_openai_help_str(is_parent)}",
187+
help=f"The OpenAI API key associated with the model to delete. Must either be passed in as an argument or set {set_openai_help_str(is_parent)}",
188188
)
189189
model_delete_required_named.add_argument(
190190
"-m",
@@ -206,7 +206,7 @@ def setup_model_delete(model_subcommand, is_parent=False):
206206

207207
def setup_job_list(job_subcommand, is_parent=False):
208208
job_list = job_subcommand.add_parser(
209-
"list", help="List your openAI customization jobs"
209+
"list", help="List your OpenAI customization jobs"
210210
)
211211
job_list_required_named = job_list.add_argument_group("required named arguments")
212212
job_list_optional_named = job_list.add_argument_group("optional named arguments")
@@ -216,7 +216,7 @@ def setup_job_list(job_subcommand, is_parent=False):
216216
"--openai-key",
217217
type=str,
218218
dest="openai_key",
219-
help=f"The openAI API key to list the jobs for. Must either be passed in as an argument or set {set_openai_help_str(is_parent)}",
219+
help=f"The OpenAI API key to list the jobs for. Must either be passed in as an argument or set {set_openai_help_str(is_parent)}",
220220
)
221221
job_list_optional_named.add_argument(
222222
"--full",
@@ -229,7 +229,7 @@ def setup_job_list(job_subcommand, is_parent=False):
229229

230230
def setup_job_info(job_subcommand, is_parent=False):
231231
job_info = job_subcommand.add_parser(
232-
"info", help="Get an openAI customization job's info"
232+
"info", help="Get an OpenAI customization job's info"
233233
)
234234
job_info_required_named = job_info.add_argument_group("required named arguments")
235235

@@ -238,7 +238,7 @@ def setup_job_info(job_subcommand, is_parent=False):
238238
"--openai-key",
239239
type=str,
240240
dest="openai_key",
241-
help=f"The openAI API key associated with the job to see the info for. Must either be passed in as an argument or set {set_openai_help_str(is_parent)}",
241+
help=f"The OpenAI API key associated with the job to see the info for. Must either be passed in as an argument or set {set_openai_help_str(is_parent)}",
242242
)
243243
job_info_required_named.add_argument(
244244
"-j",
@@ -252,7 +252,7 @@ def setup_job_info(job_subcommand, is_parent=False):
252252

253253
def setup_job_events(job_subcommand, is_parent=False):
254254
job_events = job_subcommand.add_parser(
255-
"events", help="Get an openAI customization job's events"
255+
"events", help="Get an OpenAI customization job's events"
256256
)
257257
job_events_required_named = job_events.add_argument_group(
258258
"required named arguments"
@@ -263,7 +263,7 @@ def setup_job_events(job_subcommand, is_parent=False):
263263
"--openai-key",
264264
type=str,
265265
dest="openai_key",
266-
help=f"The openAI API key associated with the job to see the events for. Must either be passed in as an argument or set {set_openai_help_str(is_parent)}",
266+
help=f"The OpenAI API key associated with the job to see the events for. Must either be passed in as an argument or set {set_openai_help_str(is_parent)}",
267267
)
268268
job_events_required_named.add_argument(
269269
"-j",
@@ -277,7 +277,7 @@ def setup_job_events(job_subcommand, is_parent=False):
277277

278278
def setup_job_cancel(job_subcommand, is_parent=False):
279279
job_cancel = job_subcommand.add_parser(
280-
"cancel", help="Cancel an openAI customization job"
280+
"cancel", help="Cancel an OpenAI customization job"
281281
)
282282
job_cancel_required_named = job_cancel.add_argument_group(
283283
"required named arguments"
@@ -288,7 +288,7 @@ def setup_job_cancel(job_subcommand, is_parent=False):
288288
"--openai-key",
289289
type=str,
290290
dest="openai_key",
291-
help=f"The openAI API key associated with the job to cancel. Must either be passed in as an argument or set {set_openai_help_str(is_parent)}",
291+
help=f"The OpenAI API key associated with the job to cancel. Must either be passed in as an argument or set {set_openai_help_str(is_parent)}",
292292
)
293293
job_cancel_required_named.add_argument(
294294
"-j",

discordai_modelizer/customize.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def create_model(
8686
if use_existing:
8787
print("INFO: Using existing dataset... Skipping download and parsing.")
8888
else:
89-
print("INFO: Parsing chat logs into an openAI compatible dataset...")
89+
print("INFO: Parsing chat logs into an OpenAI compatible dataset...")
9090
try:
9191
parse_logs(
9292
full_logs_path,
@@ -103,7 +103,7 @@ def create_model(
103103
if not clean:
104104
print(f"INFO: Dataset saved to {full_dataset_path}")
105105

106-
# Train customized openAI model
106+
# Train customized OpenAI model
107107
if base_model in ["davinci", "babbage"]:
108108
print("INFO: Starting OpenAI fine-tune job...")
109109
upload_response = client.files.create(

discordai_modelizer/version.py

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

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
version=package.__version__,
2222
author="Adib Baji",
2323
author_email="[email protected]",
24-
description="A package that utilizes openAI to create custom AI models out of your Discord chat history",
24+
description="A package that utilizes OpenAI to create custom AI models out of your Discord chat history",
2525
long_description=pathlib.Path("README.md").read_text(),
2626
long_description_content_type="text/markdown",
2727
url="https://github.com/A-Baji/discordAI-modelizer",

tests/test_modelization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_use_existing_fail(capsys, default_file_output):
4545
def test_not_use_existing(capsys, default_file_output):
4646
customize.create_model(CHANNEL_ID, USER, use_existing=False)
4747
stdout = capsys.readouterr()
48-
assert "INFO: Parsing chat logs into an openAI compatible dataset..." in stdout.out
48+
assert "INFO: Parsing chat logs into an OpenAI compatible dataset..." in stdout.out
4949

5050

5151
def test_not_use_existing_dirty(capsys, default_file_output):

0 commit comments

Comments
 (0)