chazeon / ZhatZPT

A Telegram chatbot that uses the ChatGPT API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ZhatZPT

A Telegram chatbot that uses the ChatGPT API, with support for Telegram's MarkdownV2 format.

Usage

Clone and install the dependencies

Clone the repo, and then install the dependencies

npm install

Set the Telegram commands

Talk to @BotFather to create the bot, obtain the bot token, then use /setcommands to create the commands.

Here are the commands that I have defined:

reset - Reset Zhat's memory

Run the chatbot

Set the OpenAI API Key and Telegram bot token you have obtained in the previous step, then run the server.

export BOT_TOKEN=xxx
export OPENAI_API_KEY=xxx

node src/index.js

Licence

MIT.

About

A Telegram chatbot that uses the ChatGPT API.

License:MIT License


Languages

Language:JavaScript 100.0%