This is an example TypeScript codebase that demonstrates how to use the ChatGPT Telegram Bot Node library. The code provides a simple way to connect to the ChatGPT API and create a bot that can respond to messages using OpenAI's ChatGPT language model.
- Node.js version >= 18.0.0
- Redis server (for storing message queue)
npm install
-
Start a Redis server.
You can download Redis from the official website, or use a cloud service like Redis -
Rename the .env.example file to .env and fill in the required information
mv .env.example .env
-
Start the service with
npm run start
This example code is licensed under the MIT License.