Teapot.py icon indicating copy to clipboard operation
Teapot.py copied to clipboard

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

Open cop6567 opened this issue 1 year ago • 4 comments

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

  • Customizable AI prompts (making your own behaviors for the bot via commands)
  • Remembering past prompts via SQL or other technologies.
  • Option to customize length of answers and how diverse responses will be.

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

cop6567 avatar May 07 '23 16:05 cop6567

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 :)

ColaIan avatar May 07 '23 18:05 ColaIan

@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.

cop6567 avatar May 07 '23 19:05 cop6567

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

ColaIan avatar May 08 '23 02:05 ColaIan

Noted.

cop6567 avatar May 08 '23 08:05 cop6567