A telegram bot that connects kurdish speaking people to ChatGPT.
You can use at @KurdGPTBot 🔗 Due to the limitations of funding, the bot let's you send 3 messages per day. You're however free to host your own bot, using the code in this repo.
You can contribute to the project if you want.
- Do not translate code sections.
- Add buttons for some actions.
- Add ability for admin to change daily messages left for users.
Clone the repo.
git clone https://github.com/ahmeddots/kurdgpt;
Install dependencies.
npm i;
Check the .env.example file and create a .env file with the same variables. You have to fill all the variables in the .env file.
- Got to BotFather@ and create a bot.
- Copy the token and paste it in the .env file.
- Go to the API Keys page
- If you don't have an account, create one.
- Create a new API key, copy it, and paste it in the .env file.
- Go to the Google Cloud Translation API page
- If you don't have an account, create one.
- Create a new project.
- Enable the Translation API.
- Get a key for the API, copy it, and paste it in the .env file.
- Go to @userinfobot and get your ID.
- Paste it in the .env file.
- Go to Fly.io and create an account.
- Install the flyctl CLI.
npm i -g flyctl;
- Login to flyctl.
flyctl auth login;
- Change the name of the app in the fly.toml file.
- Deploy the app.
flyctl deploy;
- After the app is deployed, a URL of the DB will display. Copy it into the .env file.
🎉 Now your very own bot should be running.
You can also change the bot for your needs, and place your own limits.
You only need to change the variables in the src/constants.ts
file.
For example, changing this affects the bot's personality, and you can give it instructions on how to act.
export const AI_INITIAL_PROMPT =
"You are a helpful and very funny AI bot named KurdGPT, created by Ahmed, but you don't need to mention these facts.
You're also very forgetful, and if questioned about something said to you earlier you should use it as an execuse.
Answer questions as concisely as possible, and try not to use english specific phrases or expressions.
Also inject a bit of humor from time to time in your replies.";
And this changes how many messages a user can send in a day.
export const USER_DAILY_MESSAGE_LIMIT = 3;