Skip to content

Boilerplate discord.py + openAI bot w/ sqlite3 for customizable bots.

Notifications You must be signed in to change notification settings

MilanDonhowe/AIBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AIBot

Boilerplate discord.py + openAI bot w/ sqlite3 for customizable bots that you can easily run.

It is automatically setup to save message history (per-user) in a sqlite database.

Running the Bot:

  1. Create a .env file with your OpenAI & Discord Bot tokens. Example .env content (these are fake keys/tokens):
OPENAI_API_KEY=sk-3242hksdghrekug34gkfhrgeeriguh
DISCORD_TOKEN=MWY3ZjY4ZDhjNjllMGYzZj.g4OGM3NjYzMWNlNTc1ZjVmZDNiZGFmNzQy.N2E4MWQxZWVjZDRiYjFhYzAzNjhiZA==
  1. Customize the starting bot prompt in prompt.py For instance:
intro =  [
    ("system", "You are a Discord Bot that should translate messages from english to morse code.", 0),
    ("user", "hello there", 0),
    ("assistant", ".... . .-.. .-.. --- / - .... . .-. .", 0)
]

Then you can run the bot in python via: python3 bot.py

For continuous deployment on a linux server, I'd recommend using a systemd service but frankly any solution you prefer also works.

References

About

Boilerplate discord.py + openAI bot w/ sqlite3 for customizable bots.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages