RedCokeDevelopment / Teapot.py

A multi-purpose discord.py python discord bot
https://teapot.bot
MIT License
186 stars 33 forks source link

[FEATURE] AI functionalities with the OpenAI API (ChatGPT) #79

Open cop6567 opened 1 year ago

cop6567 commented 1 year ago

I would like to work on the AI functionalities

I have a lot of experience with APIs, hence AI. I'd like to work on the feature as my first contribution.

Here's what the features the bot should have related to AI

In summary, the goal is to create a fully customizable AI system in the bot.

ColaIan commented 1 year ago

Hi there, unfortunate to say but our bot probably wouldn't even work on its own right now (see #68) as we haven't maintained it for quite a while. If you would like to contribute, consider fixing our bot first 🤣. Anyway back to your issue, AI is a nice idea but we're not sure about the ease of abuse if we were to host a public bot with an API key attached, maybe you will also have to consider about rate limit settings per user/per guild (either a rate limit bucket or rate limit per x amount of time would work), so people who host the bot doesn't go bankrupt in 5 minutes :)

cop6567 commented 1 year ago

@ColaIan I agree, The custom prompt feature will allow you to limit bot abuse. As far as rate limiting goes. I might have some solutions. We limit the number of tokens the bot can send or make it asynchronous. I recommend we use both of these practices. Apart from that I recommend there be a different channel specific to talking to the AI. A slowmode of 5 seconds would make a difference.

As for the problem mentioned in #68, I might be able to help maintain it since I have been developing a few discord bots of my own with discord.py quite recently.

Anyways, thanks for the reply and I'll see what I can do.

ColaIan commented 1 year ago

Whether splitting the channel and enabling slow mode or not doesn't matter, it'll be the guild owner's option, as long as there is a working rate limit on the bot side it'll be good

cop6567 commented 1 year ago

Noted.