An IRC bot that connects to Chat-GPT's davinci model via API and allows you interact with it.
- Install all the required dependencies (python3, openai via pip, etc.)
- Head to https://platform.openai.com/account/api-keys and generate a key. You will need an account.
- Replace "apikey" with your new key.
- Change the server settings to what you want.
- Change the prompt_base if you want extra customization for AI responses.
- Under "response = openai.Completion.create" change the model settings if you feel like it.
- Change the number in "if i >= 10:" if you want to modify the max amount of lines the bot can send to your channel. Default: 10
- IRC restrictions: max_chars_per_line = 256
- Context! He can in context now!
- Multiple nicknames for contact with bot - allow_names variable.
Run it and you should be good to go! To chat with the bot, type in ChatGPT: Hi!
This model is not free! You can make a free account and generate a key but you will run out of free credits if you use it long enough. See https://platform.openai.com/account/usage for more details. It won't always respond to requests if the API is "overloaded". It should print an error message in this case. Calling the model this way bypasses the normal moderation filter. You may get banned if you get it too spit out too many things the company deems inappropriate usage. This version of the model has no memory. Though it may trick you into believing otherwise, it won't remember or be able to reference any previous messages.