Skip to content

ciuzaak/ChatBot-TGLM6B

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatBot-TGLM6B

demo

ChatBot-TGLM6B is a chatbot utilizing the Telegram API and the ChatGLM-6B.

  • Private Chat
  • Group Chat (requires mention or reply)
  • Chat Context (up to 16384 tokens per user)
  • Invitation Mode (see admin commands)
  • Independent Chat Session
  • Auto CUDA Memory Management
  • Auto Error Handling

demo

Requirements

Usage

  1. Clone this repository
git clone https://github.com/Lakr233/ChatBot-TGLM6B
cd ChatBot-TGLM6B
  1. Download the model
# disable lfs when pull, change to int4 if needed
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/THUDM/chatglm-6b model 

# inside model dir
git lfs fetch --all
git lfs checkout
  1. Install requirements
pip install -r requirements.txt
  1. Edit the config inside code
token = 'aaaaaaaaaa:88888888888888888888888888888888888'
admin_id = ['000000000']

Note: You need to disable Telegram-Bot 'Privacy Mode' to enable reply to talk in group chat.

  1. Run the bot
python3 ./main.py

License

This project is licensed under the WTFPL.


2023.3.23

About

ChatGLM-6B Bot for Telegram

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%