You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# DiscordAI
2
-
DiscordAI is CLI package that you can use to run your discord bot. You can create customized openAI models based on a discord channel and user, and then add new slash commands to your bot to use these custom models to create openAI completions.
2
+
DiscordAI is CLI package that you can use to run your discord bot. You can create customized openAI models based on a discord channel and user, and then add new slash commands for your discord bot to use these custom models in openAI completions.
3
3
4
4
DiscordAI is a parent module of [DiscordAI Modelizer](https://github.com/A-Baji/discordAI-modelizer).
5
5
@@ -26,25 +26,27 @@ The model creation process can be broken down into three steps: downloading the
26
26
27
27
Pick a channel and user whose chat logs you want to use for creating your custom model and run:
28
28
29
-
`discordai model create -c <channel_id> -u "<username#id>" --dirty`
29
+
`discordai model create -c <channel_id> -u "<username>" --dirty`
30
30
31
-
You can follow [this guide](https://turbofuture.com/internet/Discord-Channel-ID) to learn how to find a channel's ID. Make sure that you include the full username with the #id, and wrap it in quotes if it contains spaces. The `--dirty` flag prevents the outputted dataset files from being deleted. Downloaded chat logs get saved and reused, but you can set the `--redownload` flag if you want to update the logs.
31
+
You can follow [this guide](https://turbofuture.com/internet/Discord-Channel-ID) to learn how to find a channel's ID. Make sure that you include the full username with the , and wrap it in quotes if it contains spaces. The `--dirty` flag prevents the outputted dataset files from being deleted. Downloaded chat logs get saved and reused, but you can set the `--redownload` flag if you want to update the logs.
32
32
33
-
You may have noticed the lack of a model customization process occurring after running that command. This is because no base model was selected, but before you specify a base model, you should analyze the generated dataset located in the directory mentioned in the logs. Chat messages are parsed into a dataset by grouping individual messages sent within a certain timeframe into "thoughts", where each thought is a completion in the dataset. The default for this timeframe is 10 seconds. The length of each thought must also be within the minimum and max thought length. The defaults for these are 4 words and `None`, or optional. If your dataset looks a bit off, try different settings using the `--ttime`, `--tmin`, and `--ttmax` options:
33
+
You may have noticed that the model creation step was skipped. This is because no base model was selected, but before you specify a base model, you should analyze the generated dataset located in the directory mentioned in the logs. Chat messages are parsed into a dataset by grouping individual messages sent within a certain timeframe into "thoughts", where each thought is a completion in the dataset. The default for this timeframe is 10 seconds. The length of each thought must also be within the minimum and max thought length. The defaults for these are 4 words and `None`, or optional. If your dataset looks a bit off, try different settings using the `--ttime`, `--tmin`, and `--ttmax` options:
After you've found good thought settings, you will want to manage your dataset's size. The larger your dataset, the more openAI credits it will cost to create a custom model. By default, the max dataset size is set to 1000. If your dataset exceeds this limit, it will be reduced using either a "first", "last", "middle", or "even" reduction method. The "first" method will select the first n messages, "last" will select the last n, "middle" will select the middle n, and "even" will select an even distribution of n messages. The default reduction method is even. You can set the max dataset size and reduction mode using the `-m` and `-r` options:
If you are still not satisfied with the resulting dataset, you can manually alter it and then use the `--use_existing` flag. This will skip the dataset processing step and instead use the pre-existing dataset.
40
42
41
43
If you are planning on creating multiple models, you may want to get your hands on multiple openAI API keys in order to maximize the free credit usage. You can assign specific api keys to custom models using the `-o` option. Otherwise, the key provided in your config will be used.
42
44
43
45
Now that you have fine tuned your dataset, you can finally begin the customization process by specifying a base model. OpenAI has four base [models](https://beta.openai.com/docs/models/gpt-3): davinci, curie, babbage, and ada, in order of most advanced to least advanced. Generally you will want to use davinci, but it is also the most expensive model as well as the longest to customize. Select your base model with the `-b` option.
44
46
45
47
Your final command should look something like this:
If you find the training step to cost too many credits with your current options, you can cancel it with `discordai job cancel -j <job_id>`, and then either lower your max dataset size, or choose a different discord channel and/or user. You can get a list of all your jobs with `discordai job list --simple`.
50
52
### Test the new model
@@ -62,7 +64,7 @@ The options after `-n` and `-i` are to set the *defaults* for the slash command.
62
64
63
65
Slash commands can be updated at any time by calling `discordai bot commands new` with the same <command_name> but different default values. You can also delete slash commands with `discordai bot commands delete -n <command_name>`.
64
66
65
-
After creating a new slash command, remember to sync your slash commands with discord's servers by running `discordai bot start --sync`, or by using `@bot_name sync global` in discord.
67
+
After creating a new slash command, remember to sync your slash commands with discord's servers by running `discordai bot start --sync`, or by using `@<your_bot> sync global` in discord.
66
68
67
69
### Questions
68
70
If you have any questions, feel free to make a new post in [discussions](https://github.com/A-Baji/discordAI/discussions/categories/q-a). If you encounter any issues while using discordAI, make sure to create a new [issue](https://github.com/A-Baji/discordAI/issues).
@@ -78,7 +80,7 @@ Manage your discord bot's slash commands
78
80
* Create a new slash command for your bot that will use a customized model for completions
79
81
*`discordai bot commands delete`
80
82
* Delete a slash command from your bot
81
-
#### `@bot_name sync|unsyc guild|global`
83
+
#### `@<your_bot> sync|unsyc guild|global`
82
84
These are special non-CLI commands that must be run *in discord*, in a channel that your bot is a member of. They are used to update or remove your bot's slash commands from discord's servers.
83
85
### Model
84
86
Commands related to your openAI models
@@ -108,4 +110,6 @@ Get or set your openaAI API key
108
110
## Disclaimer
109
111
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.
110
112
111
-
By using this application, you agree to use it responsibly. The developers of this application are not responsible for any improper use of the application or any consequences resulting from such use. We strongly discourage using this application for any unethical purposes.
113
+
By using this application, you agree to use it responsibly. The developers of this application are not responsible for any improper use of the application or any consequences resulting from such use. We strongly discourage using this application for any unethical purposes.
114
+
115
+
This application is not affiliated with or endorsed by Discord, Inc. The use of the term "Discord" in our product name is solely for descriptive purposes to indicate compatibility with the Discord platform.
0 commit comments