Sign inSign up

jp0id/chatgpt-telegram-bot

By jp0id

•Updated over 3 years ago

Telegram bot for ChatGPT

Image
0

956

jp0id/chatgpt-telegram-bot repository overview

⁠开始

mkdir chatgpt-telegram-bot && cd chatgpt-telegram-bot && touch docker-compose.yml
vi docker-compose.yml

⁠添加以下内容并修改:

version: "3"
services:
  chatgpt-telegram-bot:
    container_name: chatgpt-telegram-bot
    image: jp0id/chatgpt-telegram-bot:latest
    restart: always
    environment:  
      # Optional, defaults to gpt-3.5-turbo. Specify which model to use.
      # Currently, only `gpt-3.5-turbo` and `gpt-4` are supported.
      - OPENAIModel=gpt-3.5-turbo
      - OPENAI_API_KEY=<your_openai_api_key>
      - TELEGRAM_APITOKEN=<your_telegram_bot_token>
      # optional, default is empty. Only allow these users to use the bot. Empty means allow all users.
      - ALLOWED_TELEGRAM_ID=<your_telegram_id>,<your_friend_telegram_id>
      # optional, default is 1.0. Higher temperature means more random responses.
      # See https:To access the documentation for creating a chat using OpenAI's API, you can visit the following link: platform.openai.com/docs/api-reference/chat/create#chat/create-temperature.
      - MODEL_TEMPERATURE=1.0

⁠更新


cd chatgpt-telegram-bot 
docker-compose down
docker-compose pull
docker-compose up -d

Tag summary

Content type

Image

Digest

sha256:ae1c2de9e…

Size

7.5 MB

Last updated

over 3 years ago

docker pull jp0id/chatgpt-telegram-bot