This code is a Telegram bot that uses the API of the Coze service to process and respond to user messages. The bot saves the history of each user's conversations and uses this information to generate responses. Before starting work Before running this code, you will need: Python 3.7 or higher Install the necessary dependencies using pip:
pip install requests
pip install pyTelegramBotAPI
-
Telegram Bot Token
-
The Coze Token
-
ID Coze bot
Tokens must be specified in the TELEGRAM_TOKEN and COZE_TOKEN variables, respectively. Launch To run this code, just run the python command with the file name:
python bot.py