From cb54d6042186e01729fbd7145f46319a8dc7df84 Mon Sep 17 00:00:00 2001 From: Kaveen Kumarasinghe Date: Mon, 2 Jan 2023 20:22:08 -0500 Subject: [PATCH] update readme --- README.md | 34 ++++++++++------------------------ cogs/image_prompt_optimizer.py | 2 +- 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index a13c3bd..199587c 100644 --- a/README.md +++ b/README.md @@ -12,32 +12,20 @@ - **AUTOMATIC CHAT SUMMARIZATION!** - When the context limit of a conversation is reached, the bot will use GPT3 itself to summarize the conversation to reduce the tokens, and continue conversing with you, this allows you to chat for a long time! -- **Private conversations, custom opening conversation text** - Check out the new options when running /chat-gpt! - -- **SLASH COMMANDS!** - -- **Image prompt optimizer overhauled** - The optimizer works much better now, and makes beautiful image prompts that work even with Midjourney, SD, etc! - -- **REDO ON EDIT** - When you edit a prompt, it will automatically be resent to GPT3 and the response updated! - -- **Fully async and fault tolerant - REVAMPED** - The bot will never be blocked when processing someone else's request, allowing for use in large servers with multiple messages per second! - -- No need for the OpenAI and Asgiref libraries anymore! - - # Features -- **Directly prompt GPT3 with `/g `** +- **Directly prompt GPT3 with `/gpt ask `** -- **Have conversations with the bot, just like chatgpt, with `/chat-gpt`** - Conversations happen in threads that get automatically cleaned up! +- **Have conversations with the bot, just like chatgpt, with `/gpt converse`** - Conversations happen in threads that get automatically cleaned up! -- **DALL-E Image Generation** - Generate DALL-E AI images right in discord with `/draw `! It even supports multiple image qualities, multiple images, creating image variants, retrying, and saving images. +- **DALL-E Image Generation** - Generate DALL-E AI images right in discord with `/dalle draw `! It even supports multiple image qualities, multiple images, creating image variants, retrying, and saving images. -- **Redo Requests** - A simple button after the GPT3 response or DALL-E generation allows you to redo the initial prompt you asked. +- **DALL-E Image Prompt Optimization** - Given some text that you're trying to generate an image for, the bot will automatically optimize the text to be more DALL-E friendly! `/dalle optimize ` -- **DALL-E Image Prompt Optimization** - Given some text that you're trying to generate an image for, the bot will automatically optimize the text to be more DALL-E friendly! `/imgoptimize ` +- **Redo Requests** - A simple button after the GPT3 response or DALL-E generation allows you to redo the initial prompt you asked. You can also redo conversation messages by just editing your message! - Automatically re-send your prompt and update the response in place if you edit your original prompt! +- Async and fault tolerant, **can handle hundreds of users at once**, if the upstream API permits! - Change and view model parameters such as temp, top_p, and etc directly within discord. - Tracks token usage automatically - Automatic pagination and discord support, the bot will automatically send very long message as multiple messages, and is able to send discord code blocks and emoji, gifs, etc. @@ -67,7 +55,7 @@ These commands are grouped, so each group has a prefix but you can easily tab co `/dalle draw ` - Have DALL-E generate images based on a prompt -`/dalle imgoptimize ` Optimize a given prompt text for DALL-E image generation. +`/dalle optimize ` Optimize a given prompt text for DALL-E image generation. `/system settings` - Display settings for the model (temperature, top_p, etc) @@ -107,9 +95,7 @@ You also need to add a DEBUG_GUILD id and a DEBUG_CHANNEL id, the debug guild id You also need to add the allowed guilds that the bot can operate on, this is the `ALLOWED_GUILDS` field, to get a guild ID, right click a server and click "Copy ID". -You also need to add the roles that can use the bot, this is the `ALLOWED_ROLES` field, enter role names here, separated by commas. Currently, there is no way to give everybody access to the bot, and you have to use roles, but it will be done soon. - -You can optionally add a fallback welcomming message for the bot to use when new members join. If enabled, the bot will DM new members with a welcomming message generated by GPT3. If the call to GPT3 fails, the string used in the .env file is used. As further redundency, a hardcoded welcomming message is used. +You also need to add the roles that can use the bots various features, scroll down a bit to "Permissions", and check out the sample environment file below. ``` OPENAI_TOKEN="" @@ -123,10 +109,10 @@ ADMIN_ROLES="Admin,Owner" DALLE_ROLES="Admin,Openai,Dalle,gpt" # People with the roles in GPT_ROLES can use commands like /gpt ask or /gpt converse GPT_ROLES="openai,gpt" -WELCOME_MESSAGE="Hi There! Welcome to our Discord server. We hope you'll enjoy our server and we look forward to engaging with you!" #Optional +WELCOME_MESSAGE="Hi There! Welcome to our Discord server. We hope you'll enjoy our server and we look forward to engaging with you!" # This is a fallback message if gpt3 fails to generate a welcome message. ``` -** Permissions ** +**Permissions** As mentioned in the comments of the sample environment file, there are three permission groups that you can edit in the environment (`.env`) file. `ADMIN_ROLES` are roles that allow users to use `/system` commands. `GPT_ROLES` are roles that allow users to use `/gpt` commands, and `DALLE_ROLES` are roles that allow users to use `/dalle` commands. diff --git a/cogs/image_prompt_optimizer.py b/cogs/image_prompt_optimizer.py index c42ef25..281b663 100644 --- a/cogs/image_prompt_optimizer.py +++ b/cogs/image_prompt_optimizer.py @@ -48,7 +48,7 @@ class ImgPromptOptimizer(discord.Cog, name="ImgPromptOptimizer"): @add_to_group("dalle") @discord.slash_command( - name="imgoptimize", + name="optimize", description="Optimize a text prompt for DALL-E/MJ/SD image generation.", guild_ids=ALLOWED_GUILDS, )