Skip to content

SSShuai1999/chatgpt-telegram-bot-node

Repository files navigation

ChatGPT Telegram Bot Node Example Code

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.

Requirements

  • Node.js version >= 18.0.0
  • Redis server (for storing message queue)

Installation

npm install

Usage

  1. Start a Redis server.
    You can download Redis from the official website, or use a cloud service like Redis

  2. Rename the .env.example file to .env and fill in the required information

    mv .env.example .env
  3. Start the service with npm run start

License

This example code is licensed under the MIT License.

Releases

No releases published

Packages

No packages published