diff --git a/README.md b/README.md index cea8bb5..a13c3bd 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,48 @@ - Prints debug to a channel of your choice, so you can view the raw response JSON - Ability to specify a limit to how long a conversation can be with the bot, to conserve your tokens. +# Commands + +These commands are grouped, so each group has a prefix but you can easily tab complete the command without the prefix. For example, for `/gpt ask`, if you type `/ask` and press tab, it'll show up too. + +`/help` - Display help text for the bot + +`/gpt ask ` Ask the GPT3 Davinci 003 model a question. + +`/gpt converse` - Start a conversation with the bot, like ChatGPT + +`/gpt converse private:yes` - Start a private conversation with the bot, like ChatGPT + +`/gpt converse opener:` - Start a conversation with the bot, with a custom opener text (this is useful if you want it to take on a custom personality from the start) + +`/gpt converse minimal:yes` - Start a conversation with the bot, like ChatGPT, with minimal context (saves tokens) + +- Note that the above options for `/gpt converse` can be combined (you can combine minimal, private, and opener!) + +`/gpt end-chat` - End a conversation with the bot. + +`/dalle draw ` - Have DALL-E generate images based on a prompt + +`/dalle imgoptimize ` Optimize a given prompt text for DALL-E image generation. + +`/system settings` - Display settings for the model (temperature, top_p, etc) + +`/system settings ` - Change a model setting to a new value + +`/system usage` Estimate current usage details (based on davinci) + +`/system settings low_usage_mode True/False` Turn low usage mode on and off. If on, it will use the curie-001 model, and if off, it will use the davinci-003 model. + +`/system delete-conversation-threads` - Delete all threads related to this bot across all servers. + +`/system local-size` - Get the size of the local dalleimages folder + +`/system clear-local` - Clear all the local dalleimages. + +# Configuration + +All the model parameters are configurable inside discord. Type `/settings` to view all the configurable parameters, and use `/settings ` to set parameters. For example, if I wanted to change the number of images generated by DALL-E by default to 4, I can type the following command in discord: `/settings num_images 4` + # Requirements `python3.9 -m pip install -r requirements.txt` @@ -154,6 +196,17 @@ screen -d -r {ID} # replace {ID} with the ID of the screen session you want to r ``` +# Non-Server, Non-Docker usage + +With python3.9 installed and the requirements installed, you can run this bot anywhere. + +Install the dependencies with: +`python3.9 -m pip install -r requirements.txt` + +Then, run the bot with: +`python3.9 gpt3discord.py` + + ## Docker Installation We now have a `Dockerfile` in the repository. This will build / install all dependencies and put a `gpt3discord` binary (main.py) into path. @@ -186,49 +239,3 @@ This can also be run via screen/tmux or detached like a daemon. - Copy the link generated below and paste it on the browser - On add to server select the desired server to add the bot - Make sure you have updated your .env file with valid values for `DEBUG_GUILD`, `DEBUG_CHANNEL` and `ALLOWED_GUILDS`, otherwise the bot will not work. Guild IDs can be found by right clicking a server and clicking `Copy ID`, similarly, channel IDs can be found by right clicking a channel and clicking `Copy ID`. - -# Usage - -`python3.9 main.py` - -# Commands - -These commands are grouped, so each group has a prefix but you can easily tab complete the command without the prefix. For example, for `/gpt ask`, if you type `/ask` and press tab, it'll show up too. - -`/help` - Display help text for the bot - -`/gpt ask ` Ask the GPT3 Davinci 003 model a question. - -`/gpt converse` - Start a conversation with the bot, like ChatGPT - -`/gpt converse private:yes` - Start a private conversation with the bot, like ChatGPT - -`/gpt converse opener:` - Start a conversation with the bot, with a custom opener text (this is useful if you want it to take on a custom personality from the start) - -`/gpt converse minimal:yes` - Start a conversation with the bot, like ChatGPT, with minimal context (saves tokens) - -- Note that the above options for `/gpt converse` can be combined (you can combine minimal, private, and opener!) - -`/gpt end-chat` - End a conversation with the bot. - -`/dalle draw ` - Have DALL-E generate images based on a prompt - -`/dalle imgoptimize ` Optimize a given prompt text for DALL-E image generation. - -`/system settings` - Display settings for the model (temperature, top_p, etc) - -`/system settings ` - Change a model setting to a new value - -`/system usage` Estimate current usage details (based on davinci) - -`/system settings low_usage_mode True/False` Turn low usage mode on and off. If on, it will use the curie-001 model, and if off, it will use the davinci-003 model. - -`/system delete-conversation-threads` - Delete all threads related to this bot across all servers. - -`/system local-size` - Get the size of the local dalleimages folder - -`/system clear-local` - Clear all the local dalleimages. - -# Configuration - -All the model parameters are configurable inside discord. Type `/settings` to view all the configurable parameters, and use `/settings ` to set parameters. For example, if I wanted to change the number of images generated by DALL-E by default to 4, I can type the following command in discord: `/settings num_images 4`