https://github.com/code-monad/chatgptbot
A Demo ChatGPT Telegram Bot Script
https://github.com/code-monad/chatgptbot
chatgpt telgram-bot
Last synced: about 2 months ago
JSON representation
A Demo ChatGPT Telegram Bot Script
- Host: GitHub
- URL: https://github.com/code-monad/chatgptbot
- Owner: code-monad
- License: mit
- Created: 2022-12-12T13:18:03.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-20T02:14:58.000Z (over 2 years ago)
- Last Synced: 2025-04-12T03:13:42.664Z (about 2 months ago)
- Topics: chatgpt, telgram-bot
- Language: Python
- Homepage:
- Size: 42 KB
- Stars: 19
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Requirements
- [Latest python-telegram-bot](https://github.com/python-telegram-bot/python-telegram-bot)
- [Latest ChatGPT](https://github.com/acheong08/ChatGPT)# Usage
First, you should install `python-telegram-bot` and `ChatGPT` library from source
```bash
# Install telegram bot library
git clone https://github.com/python-telegram-bot/python-telegram-bot
cd python-telegram-bot && python setup.py install --user
# For proxy support
pip install httpx[socks]# Install ChatGPT API
git clone https://github.com/acheong08/ChatGPT
cd ChatGPT && python setup.py install --user
```First, create a `config.toml` from the [template file](./config.example.toml)
Modify the content, replace with the correct keys/session-IDs (Check [Wiki](https://github.com/acheong08/ChatGPT/wiki/Setup0))
```bash
python main.py
```# Avaliable Commands
- `/start` -- Initialize
- `/list` -- List all memories
- `/check` -- Check current session detail
- `/reroll` -- Refresh latest reply with latest prompt
- `/reborn` -- Start a new session
- `/rollback` -- Forgot last prompt