Skip to content

Helltar/artific_intellig_bot

Repository files navigation

AIBot for Telegram

Demo: https://t.me/+siikRmY3uyE5YTBi

Installation

Edit the .env file where:

  • CREATOR_ID: your Telegram user-ID
  • BOT_TOKEN: BotFather
  • BOT_USERNAME: BotFather (example: artific_intellig_bot)

and also include the data for connecting to PostgreSQL.

NOTE: to get your Telegram ID, you can use @artific_intellig_bot by entering the command /myid

Docker

docker run --rm -d --name aibot --env-file .env ghcr.io/helltar/aibot:latest

Or run without Docker

NOTE: you need to install https://ffmpeg.org on your system (for /asr command)

Build & Run:

./gradlew shadowJar
java -jar build/libs/artific_intellig_bot-version.jar

Usage

First obtain API keys:

and add them using the command in the bot:

  • /updatekey openai.com sk-qwerty
  • /updatekey stability.ai sk-qwerty

Commands

  • /chat - ChatGPT
  • /vision - GPT-4 Vision
  • /dalle - DALL·E 2
  • /sdif - Stable Diffusion
  • /dallevar - DALL·E 2 Variations
  • /asr - Automatic Speech Recognition (openai-Whisper)
  • /about

Additional chat commands:

  • /chatctx - view dialogue history
  • /chatrm - clear history

For audio responses (TTS), add the #voice tag to your message, for example:

Hello, how are you? #voice

Admin commands

  • /enable commandName (example: /enable chat)
  • /disable commandName (example: /disable dalle)

NOTE: run /enable or /disable with no arguments for view supported commands

  • /ban (use as reply to user message, example: /ban reason)
  • /unban (use as reply to user message or by user ID)
  • /banlist

  • /slowmode (use as reply to user message, example: /slowmode 5) (requests per. hour)
  • /slowmodeoff (use as reply to user message or by user ID)
  • /slowmodelist

  • /addadmin (add admin by ID, example: /addadmin 123456789 username) (creator-only command)
  • /rmadmin (remove admin by ID)
  • /sudoers (view admin list, run it only in private chat)

  • /addchat (add chat to white list, use in chat or by ID) (creator-only command)
  • /rmchat (remove chat from white list, use in chat or by ID)
  • /chats (view chats list, run it only in private chat)

IntelliJ IDEA logo.