Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chazeon/zhatzpt
A Telegram chatbot that uses the ChatGPT API.
https://github.com/chazeon/zhatzpt
chatgpt chatgpt-api telegram-bot
Last synced: about 2 months ago
JSON representation
A Telegram chatbot that uses the ChatGPT API.
- Host: GitHub
- URL: https://github.com/chazeon/zhatzpt
- Owner: chazeon
- License: mit
- Created: 2023-03-12T06:37:31.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-04T15:14:35.000Z (almost 2 years ago)
- Last Synced: 2023-08-03T01:11:18.915Z (over 1 year ago)
- Topics: chatgpt, chatgpt-api, telegram-bot
- Language: JavaScript
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ZhatZPT
A Telegram chatbot that uses the ChatGPT API, with support for Telegram's [MarkdownV2](https://core.telegram.org/bots/api#markdownv2-style) format.
## Usage
### Clone and install the dependencies
Clone the repo, and then install the dependencies
```bash
npm install
```### Set the Telegram commands
Talk to [@BotFather](https://telegram.me/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.```bash
export BOT_TOKEN=xxx
export OPENAI_API_KEY=xxxnode src/index.js
```## Licence
[MIT](./LICENCE).