明国三年一场雨

明国三年一场雨

热爱技术分享
telegram
email

Telegram is integrated with ChatGPT-4. Telegram is an artificial intelligence developed by Open AI, based on ChatGPT and Telegram, to build an AI chatbot. Experience the powerful features of ChatGPT. Currently, the best solution is to integrate Telegram with ChatGPT-4.

Installation Preparation: One VPS, Telegram API, OpenAI API key

Open source project address: https://github.com/karfly/chatgpt_telegram_bot

  1. SSH connection tool Fianlshell download link: https://www.hostbuf.com/t/988.html

  2. Get Telegram API and get OpenAI API key

Details can be found at api.telegram.org

  1. Download and install the open source project
    __
    Install git
apt install git

Clone the open source project

git clone https://github.com/karfly/chatgpt_telegram_bot.git

Enter the file directory

cd /root/chatgpt_telegram_bot

Change the file names

mv config/config.example.yml config/config.yml
mv config/config.example.env config/config.env

Double-click to open the config.yml file and add the Telegram API and OpenAI API keys prepared earlier

  1. Install Docker and Docker Compose

Install Docker

apt update
apt install curl
curl -fsSL get.docker.com -o get-docker.sh
sh get-docker.sh

Docker management

systemctl start docker # Start the container
systemctl enable docker # Enable auto-start on boot
systemctl status docker # Check status
docker --version # Check Docker version

Install Docker Compose

apt-get install docker-compose

Restart the server

reboot

Enter the file directory again

cd /root/chatgpt_telegram_bot

Execute the installation

docker-compose --env-file config/config.env up --build
  1. Robot usage commands

/retry - Regenerate the last robot answer
/new - Start a new conversation
/mode - Select chat mode
/balance - Display balance
/help - Display help

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.