A simple AI chatbot that integrates ChatGPT API on Telegram.
- Rename
.env.templateand provide your ownTELEGRAM_TOKENandOPENAI_API_KEY. - Build the Docker image.
docker build -t telegen .- Create and run the container.
docker run --rm -v $(pwd):/usr/local/src -p 5000:5000 --env-file=.env telegen- Visit localhost:5000 in your browser.
/restartto clear chat history./system <instruction>will change the behavior of the assistant.
This project should be easily deployable as a Cloud Run service on GCP. Just make sure to set up all environment variables and change the maximum number of instances to 1 (you shouldn't have more than one bot instance running at the same time).
Icons created by rcherem and juicy_fish - Flaticon
