GPT/Whisper/DALL-E Telegram Bot using AWS features
- Lambda, DynamoDB (full auto-deployment)
Fargate, ECS (manual Docker container deployment)Deprecated
- Python 3.9+
- AWS CLI
- AWS credentials and region setup in the `~/.aws/credentials` file
- Chalice
-
Create a Free Tier AWS account
-
Install and setup AWS CLI (region must be specified in ~/.aws/credentials. Ex.: region=eu-west-1)
-
Update the `.chalice/config.json` file with your Telegram Bot API, OpenAI API Token, and your telegram userID (get it from @userinfobot).
-
Run the
deploy.sh
script to deploy the Telegram Bot to AWS Lambda (ordeploy.sh name
for a custom config)
For voice processing you will need to do the next manually (it will be automated in the next releases):
- Upload ffmpeg.zip to your S3 bucket
- Create Lambda Layer using S3 URI
- Attach layer to your Lambda function
- Currently used openAI model: gpt-3.5, gpt-4 (Choose in config or by the bot's command)
- Image generation
/image prompt
or just ask without the command! - Voice message transcript (Just send any voice message)
- Video transcript and translation! (Send any video to the bot, and it will transcribe and translate it to English)
- The context of your chat is saved until you use the command
/clear
- The price in USD of the response is shown
- Multi-config support: keep multiple chalice configs to deploy multiple bots
.chalice/name.config.json