This chatbot is built using the Discord.js library and utilizes the Microsoft DialoGPT conversational model fine-tuned on the character Elysia from the game Honkai Impact.
Before you begin, you will need to have the following:
- A Discord account and a Discord server where you have permission to add a bot
- Node.js and npm installed on your local machine
- A Hugging Face account (free)
- Clone this repository to your local machine.
- In the root directory of the project, run
setup.bat
to install the required dependencies. - Create a file named .env in the root directory of the project and add the following:
DISCORD_TOKEN=[Your Discord bot token]
HUGGINGFACE_TOKEN=[Your Hugging Face API key]
You can get a Discord bot token by creating a new bot in the Discord Developer Portal.
To get a Hugging Face API key, go to your account settings on the Hugging Face website.
To run the bot, simply run run.bat
in the root directory of the project. The bot will connect to the Discord server and will be ready to use.
To use the bot, make a channel named elysia
and simply send a message to the channel the bot will respond using the Elysia conversational model.
To edit the channel name that you want the chatbot to talk to, go to config.json
and edit the "channelName": "elysia"
to the channel name you want it to chat.
You can change the conversational model in the config.json
by editing "modelName": "Jaszii/DialoGPT-Elysia"
to the conversational model you want to use.
{
"channelName": "elysia",
"modelName": "Jaszii/DialoGPT-Elysia"
}
Microsoft DialoGPT on Hugging Face
How to Build a Discord AI Chatbot that Talks Like Your Favorite Character