Serverless Telegram bot logo

Serverless Telegram bot

Free

ChatGPT Telegram Bot, serverless on AWS Lambda

FreeFree tier
Inputs: textOutputs: text
Type
Open Source

About Serverless Telegram bot

ChatGPT Telegram Bot Serverless is an open-source Telegram bot that leverages the official ChatGPT API to provide conversational AI capabilities directly within Telegram. Deployed entirely on AWS Lambda using the Chalice framework, it eliminates the need for a local server. Features include support for voice messages (via S3 bucket), Markdown rendering, and seamless integration with OpenAI's API. The bot is designed for easy setup and deployment by developers familiar with AWS and Python.

Key Features

Leverages the official ChatGPT API for conversational AI
Deployed entirely on AWS Lambda using Chalice, no local server required
Supports voice messages via S3 bucket integration
Markdown rendering for formatted responses
Easy deployment with chalice deploy and Telegram webhook setup
Open source, hosted on GitHub

Pros & Cons

Pros
  • Fully serverless (AWS Lambda) – no server maintenance
  • Free and open source
  • Voice message support enhances accessibility
  • Markdown rendering for rich text responses
  • Uses official ChatGPT API for reliable and up-to-date AI responses
  • Straightforward deployment process with Chalice
Cons
  • Requires an AWS account and OpenAI API key, incurring potential costs
  • Manual setup steps needed (Telegram token, S3 bucket configuration)
  • No one-click deployment (CloudFormation template listed as coming soon)
  • Dependent on OpenAI API availability and rate limits

Best For

Building a personal or team ChatGPT assistant accessible via TelegramIntegrating AI chat capabilities into Telegram without managing serversExperimenting with ChatGPT API in a serverless environmentCreating a voice-enabled AI bot for hands-free interaction

FAQ

What is ChatGPT Telegram Bot Serverless?
It is an open-source Telegram bot that uses the official ChatGPT API to let users chat with ChatGPT directly in Telegram. The bot runs entirely on AWS Lambda, making it serverless.
What are the prerequisites for deploying this bot?
You need an OpenAI account (for API key), an AWS account, a Telegram bot token (from BotFather), and optionally an S3 bucket if you want voice message support.
Does this bot support voice messages?
Yes, it supports voice messages. You need to create an S3 bucket and configure the VOICE_MESSAGES_BUCKET in the config file.
How do I deploy the bot?
After setting up prerequisites, install Python dependencies, configure the .chalice/config.json with your tokens, run 'chalice deploy', then set the Telegram webhook to the Lambda function URL.
Is this bot free to use?
The bot code itself is free and open source. However, you need to pay for OpenAI API usage and potentially AWS Lambda costs, though Lambda has a generous free tier.