Skip to content

Commit 0a350a9

Browse files
committed
OpenAI
1 parent f2fc695 commit 0a350a9

File tree

6 files changed

+30
-30
lines changed

6 files changed

+30
-30
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
134134

135135
### Changed
136136

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

139139
### Removed
140140

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

143143
## [1.0.1] - 02-11-2023
144144

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: 14 additions & 14 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"
@@ -57,7 +57,7 @@ def setup_model_create(model_subcommand, is_parent=False):
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",
@@ -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(

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)