diff --git a/README.md b/README.md index 5c6a847..81bc9c0 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,15 @@ After the user's key is validated, they will be able to use GPT3 and DALLE comma The Moderations service still uses the main API key defined in the `.env` file. Pinecone and discord-tokens are also per-host tokens, not per-user. +# Step-by-Step Guides for GPT3Discord + +[**GPT3Discord Guides**](https://github.com/Kav-K/GPT3Discord/tree/main/detailed_guides) + +If you follow the link above, you will now get to detailed step-by-step guides that will help you to install and set up your GPT3Discord bot quickly and easily. If you still run into problems or have suggestions for improving the guides, you can join the [**Discord-Server**](https://discord.gg/openai) and **@FluffyFox** will help you in our [**Discord-Thread**](https://discord.com/channels/974519864045756446/1050326404841082930). + +*The number and content of the guides is constantly adapted to current requirements.* + + # Configuration All the model parameters are configurable inside discord. Type `/system settings` to view all the configurable parameters, and use `/system settings ` to set parameters. diff --git a/detailed_guides/DROPLET-Guide.md b/detailed_guides/DROPLET-Guide.md new file mode 100644 index 0000000..ff5f466 --- /dev/null +++ b/detailed_guides/DROPLET-Guide.md @@ -0,0 +1,67 @@ +

How to create your own Droplet with DigitalOcean to run GPT3Discord

+
Date: January 8, 2023
+
Author: CrypticHeaven-Lab
+
+ + +

1. Go to DigitalOcean | The Cloud for Builders

+
+ +

2. Click on Sign up to register yourself.

+Click on Sign up to register yourself. +
+ +

3. If you already have an account click on Sign in.

+If you already have an account click on Sign in. +
+ +

4. Click password field

+Click password field +
+ +

5. Enter your password and click on Log In.

+Enter your password and click on Log In. +
+ +

6. After these steps click on "Explore our control panel".

+After these steps click on "Explore our control panel". +
+ +

7. Then Click on "Get started with a Droplet".

+Then Click on "Get started with a Droplet". +
+ +

8. Here it is very important to choose the right distribution via the drop down menu.

+

The distribution which works best with the bot is Ubuntu 20.04 (LTS) x64.

+Here it is very important to choose the right distribution via the drop down menu. +
+ +

9. For the next step You've to choose a plan and the CPU option.

+

Do at least as shown in the picture below.

+For the next step You've to choose a plan and the CPU option. +
+ +

10. You really don't need to add more block storage, as there is enough on default for the bot.

+

Just choose the region closest to yours right below the "Add block storage"

+You really don't need to add more block storage, as there is enough on default for the bot. +
+ +

11. Choose the Password option and set up your password.

+Choose the Password option and set up your password. +
+ +

12. I highly recommend you turn on the backup feature.

+

Backups increase the monthly amount to pay. The rest is up to you as it is free.

+I highly recommend you turn on the backup feature. +
+ +

13. Give your Droplet a name or left it untouched if you don't want to rename it.

+

Choose some tags or left it untouched. It's for you to decide.

+Give your Droplet a name or left it untouched if you don't want to rename it. +
+ +

14. Congratulations! You have successfully created your own Droplet.

+
+ +
+
diff --git a/detailed_guides/OPENAI-Guide.md b/detailed_guides/OPENAI-Guide.md new file mode 100644 index 0000000..2fe7e33 --- /dev/null +++ b/detailed_guides/OPENAI-Guide.md @@ -0,0 +1,40 @@ +

How to get a API-Key from OpenAI

+
Date: January 8, 2023
+
Author: CrypticHeaven-Lab
+
+ + +

1. Go to OpenAI at https://openai.com/api/

+
+ +

2. Click on "SIGN UP" at the top right corner.

+Click on "SIGN UP" at the top right corner. +
+ +

3. Register yourself a new Account following the shown instructions.

+
+ +

4. After the successful registration you see the OpenAI overview.

+After the successful registration you see the OpenAI overview. +
+ +

5. There you click in the top right corner at "Personal".

+There you click in the top right corner at "Personal". +
+ +

6. And then click at "View API keys" in the dropdown menu.

+And then click at "View API keys" in the dropdown menu. +
+ +

7. On the next page click at "Create new secret key".

+

If you failed to copy it or lost the copied key, redo that step and delete the old key by clicking on the little grey trash icon right next to the "LAST USED" information for your key.

+On the next page click at "Create new secret key". +
+ +

8. IMPORTANT STEP! Copy this key by clicking the green highlighted button.

+

We will need this key in the future for setting up the bot on our server.

+IMPORTANT STEP! Copy this key by clicking the green highlighted button. +
+ +
+
diff --git a/gpt3discord.py b/gpt3discord.py index 752268a..03fd33c 100644 --- a/gpt3discord.py +++ b/gpt3discord.py @@ -40,7 +40,12 @@ if PINECONE_TOKEN: PINECONE_INDEX = "conversation-embeddings" if PINECONE_INDEX not in pinecone.list_indexes(): print("Creating pinecone index. Please wait...") - pinecone.create_index('conversation-embeddings', dimension=1536, metric='dotproduct', pod_type='s1') + pinecone.create_index( + "conversation-embeddings", + dimension=1536, + metric="dotproduct", + pod_type="s1", + ) pinecone_service = PineconeService(pinecone.Index(PINECONE_INDEX)) print("Got the pinecone service") diff --git a/models/autocomplete_model.py b/models/autocomplete_model.py index f007862..b78dbeb 100644 --- a/models/autocomplete_model.py +++ b/models/autocomplete_model.py @@ -41,7 +41,11 @@ class Settings_autocompleter: "summarize_threshold": [str(num) for num in range(800, 3500, 50)], } if ctx.options["parameter"] in values.keys(): - return [value for value in values[ctx.options["parameter"]] if value.startswith(ctx.value.lower())] + return [ + value + for value in values[ctx.options["parameter"]] + if value.startswith(ctx.value.lower()) + ] else: await ctx.interaction.response.defer() # defer so the autocomplete in int values doesn't error but rather just says not found return [] diff --git a/sample.env b/sample.env index d81af32..10fb949 100644 --- a/sample.env +++ b/sample.env @@ -15,4 +15,4 @@ 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!" # This is a fallback message if gpt3 fails to generate a welcome message. -USER_INPUT_API_KEYS="False" # If True, users must use their own API keys for OpenAI. If False, the bot will use the API key in the .env file. \ No newline at end of file +USER_INPUT_API_KEYS="False" # If True, users must use their own API keys for OpenAI. If False, the bot will use the API key in the .env file.