Skip to content

deanshub/gpt-bot

Repository files navigation

AI telegram bot

Features

  • Chat with GPT
  • Schedule messages
  • Image generation
  • Image reading (including captions)
  • List scheduled messages
  • Store scheduled messages in database

Local setup

create .env file (you can also copy from .env.example)

OPENAI_API_KEY=sk-...
BOT_TOKEN=...
AUTHORIZED_USERS=telegram_user_ids_seperated_by_commas
BUFFER_MESSAGES_TIMEFRAME=60
DB_PATH=messages.db

To install dependencies:

bun install

To run:

bun start

Prebuilt docker image

The docker images are hosted on GitHub packages. You can use them by pulling the image:

docker pull ghcr.io/deanshub/gpt-bot:main

Docker compose example

version: '3'
services:
    gpt-bot:
        image: ghcr.io/deanshub/gpt-bot:main
        restart: unless-stopped
        environment:
            OPENAI_API_KEY: 'OPENAI_API_KEY_HERE'
            BOT_TOKEN: 'TOKEN_HERE'
            AUTHORIZED_USERS: 'ID1,ID2'
            BUFFER_MESSAGES_TIMEFRAME: '60'
            DB_PATH: '/media/external/messages.db'
        volumes:
            - /media/external:/media/external
        privileged: true

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages