This repo is a fork based on Karfly's infrastructure, with some added functionalities by me. Please check his repo out, this wouldnt have been possible without him!
This repo is ChatGPT re-created as Telegram Bot, and its 95% ready for you to deploy and potentially earn money
You can deploy your own bot, or use mine: @Chatdud Bot
If you decide to clone the repo and use the bot, please consider starring the project. I would be really greatful! <3
config/chat_modes.yml
GPT-4 Vision is finally fully integrated and supported (inspiration taken from multiple places as I had issues)
GPT-4o (omni) support, faster and cheaper than GPT-4 turbo, with october 2023 knowledge cut-off date.
Claude 3 models from Anthropic are now supported, namely: Opus, Sonnet and Haiku.
15 new chat modes: Cyber Dud (⌐■_■), ⌨️ Stenographer (Speech to text), 💻🟧 Grimoire (Advanced coding assitant), 🖥️ Bash dud (Linux Terminal), 🦆 Duck Mode, and a bunch of characters from movies and shows!
Transcribe voice messages (choose ⌨️ Stenographer)
Selectable DALL-E models and their configurations. You can choose between DALL-E 2 which allows you to generate multiple images at once and DALL-E 3 which allows you to choose the image quality. You can choose the image resolution for both models in /settings
Artist model
Improved start and help messages
Improved the settings and balance menus, theyre now more user friendly and clean
Different user roles: admin, beta tester, friend, regular user, trial user
Payment system using Stripe, updating user balance automatically after payment
Special donation button
Customizable profit margin based on roles in config/config.example.yml
Check user balance before making the API call and prompt them to top-up if it's too low. Can be turned off by changing the role deduction rates to 0
Tracking the balance in euros and tokens. The default is in euros, advanced users and switch to the token system, the functions are there.
The ability to run either the full version with the payment system, or the one without it, freeing up resources if it isnt used.
/new
– Start new dialog/retry
– Regenerate last bot answer/mode
– Select chat mode/balance
– Show balance/topup
– Add credits to your account /settings
– Show settings/help
– Show the commands/role
– Show your role/model
- Show your current selected model/admin
- Display admin commands (if youre admin)Get your OpenAI API key and/or your (optional) Anthropic API key
Get your Telegram bot token from @BotFather
Get your Stripe secret key (optional if you dont want to use the payment system)
Edit config/config.example.yml
to set your tokens, stripe key (if you choose to use stripe), then run the 2 commands below (if you're advanced user, you can also edit config/config.example.env
):
mv config/config.example.yml config/config.yml
mv config/config.example.env config/config.env
Download and install docker, then open the app.
(Optional) Setup ngrok to automatically update the users balance after payment and send them a confirmation message (ignore this if you dont want to update your balance automatically and in real time, skip to step 7)
Download ngrok:
Unzip the folder
Connect your account
For MacOS:
cd Downloads
)../ngrok authtoken <YOUR_AUTH_TOKEN>
For Windows:
Open Command Prompt.
Open terminal and navigate to the folder where you unziped ngrok (e.g. cd Downloads
).
Run:
ngrok.exe authtoken <YOUR_AUTH_TOKEN>
Keep the terminal window open
Run ngrok
For MacOS:
./ngrok http 5000
For Windows
ngrok.exe http 5000
Add the webhook endpoint to the Stripe dashboard
Developers
sectionAdd endpoint
Endpoint URL
field, enter the URL you got from ngrok followed by /stripe-webhook
https://NUMBERS.ngrok-free.app/stripe-webhook
+Select events
checkout.session.completed
. Now Add event then Add endpoint.Edit config/config.yml
to set your webhook secret
Please note that the free plan for ngrok gives you a new URL everytime you run the service, which means that you have to keep it running all the time and update the URL in the stripe dashboard if you restart ngrok. For a static domain, you need to have the paid subscription.
Now youre done setting up the payment system, good job!
🔥 And now, cd to the Chatgpt-Claude_telegram_bot_with_payment_system
directory
docker-compose --env-file config/config.env up --build
docker-compose -f docker-compose_nopayment.yml --env-file config/config.env up --build
If you found my fork useful, use the topup command in my bot for any donations! Send me a message so that I know it was you who donated, you can be on this list: