• Stars
    star
    326
  • Rank 128,277 (Top 3 %)
  • Language
    Python
  • License
    GNU Affero Genera...
  • Created over 1 year ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

💜 The best free Telegram bot for ChatGPT, Microsoft Copilot (aka Bing AI / Sidney / EdgeGPT), Microsoft Copilot Designer (aka BingImageCreator), Gemini and Groq with stream writing, requests with images, multiple languages, admin control, data logging and more!

🤖 GPT-Telegramus

GPT-Telegramus logo

The best Telegram bot for ChatGPT, EdgeGPT (aka Bing AI), DALL-E, Bing Image generator, Bard and Gemini with stream writing, requests with images (for Bard and Gemini only), multiple languages, admin control, automatic proxy searcher, data logging and more!

YouTube Bandcamp Spotify SoundCloud

Banner


😋 Support project

Support the project by buying and listening to my music 🎵

Or message me if you would like to donate 💰

Star History Chart


🤗 Contributors

  • 1️⃣ Sprav04ka - Tofii'skovyi' language, Testing, Super beautiful poster, Project Logo, Motivation
  • 2️⃣ Hanssen - Markdown parsing, bard images, /chat command, caption fix, loading emoji, dynamic splitting, code block splitting, Gemini module, Docker fix, GitHub actions fix and much much more
  • 3️⃣ Sergey Krashevich - Docker, GitHub Actions
  • 4️⃣ Wahit Fitriyanto - Indonesian language
  • 5️⃣ Alexander Fadeyev - EdgeGPT Fix
  • 6️⃣ AnthroAsja - Author of the Belarusian translation
  • 7️⃣ Anonymous Samurai - Author of the Ukrainian translation
  • 8️⃣ Dunya Jafari - Author of the Persian translation

🏗️ Requirements

  • Python 3.10
  • GO lang (for ChatGPTProxy)
  • Unblocked access to the telegram bot official API
  • Other requirements specified in the requirements.txt file

📙 Project based on


❓ Get started

  1. Install Python 3.10, venv and pip
  2. Download source code
  3. Create venv python -m venv venv / python3 -m venv venv / python3.10 -m venv venv
  4. Activate venv source venv/bin/activate / venv\Scripts\activate.bat
  5. Check python version using python --version command. It should be 3.10.X
  6. Install requirements pip install -r requirements.txt --upgrade
  7. Access the modules you want to use (Generate an API key / access token for ChatGPT / DALL-E / Gemini, save cookies for EdgeGPT / Bard)
  8. Start ChatGPTProxy for ChatGPT (see 🔗 Chat-GPT Base URL (proxy) section)
  9. Carefully change all the settings (in the config.json file) to suit your needs. If you have questions regarding any setting, open an issue, I will add a more detailed description
  10. Create bot at https://t.me/BotFather
  11. Type Bot's token into api_key in telegram in config.json file
  12. Run main script python main.py
  • ChatGPT
    • Browser-like Chat-GPT. Currently, without extensions and image requests (text only) (because I don't have a paid account to test it)
    • Stream response support
    • Chat history support
    • Works better with API type 1 and an access_token for authentication
    • Note: Please refer to the 🔗 Chat-GPT Base URL (proxy) section for correct usage.
  • DALL·E
    • Image generation tool from OpenAI
    • Requires an OpenAI account with unexpired credits
  • EdgeGPT (aka Bing AI) (aka Sydney)
    • Supports conversation style /style
    • Stream response support
    • Chat history support
    • Web-browsing (probably) and sources support
    • Unfortunately, it can't accept images as input yet, nor can it generate them. Please use Bing ImageGen to generate images.
  • Bing ImageGen
    • Bing Image Generator. Used as a separate module due to issues with the EdgeGPT module
    • Free and unlimited
  • Bard
    • Google's Bard AI
    • Chat history support
    • Web-browsing support (probably)
    • Now supports requests with images (you can send an image with text to it) NEW
  • Gemini
    • Google's AI using the Gemini Pro model
    • Chat history support
    • Requests with images (you can send an image with text to it)
    • Requests with images will not be recorded in the chat history since Google hasn't support this

💬 Bot messages

  • You can edit telegram bot messages by editing file messages.json. You can add new lines by adding \\n
  • You can add a new language simply by copying one of existing language (with {}) to the end of file (before the last ]) and translating all values

Note: make sure you don't delete argumensts {0}, {1}, ... in message and please restart python script to apply changes

Currently available languages

  • 🇺🇸 English
  • 🇷🇺 Русский
  • ‍☠️ Тофийсковый
  • 🇮🇩 Bahasa Indonesia
  • 🇨🇳 简体中文
  • 🇧🇾 Беларуская
  • 🇺🇦 Українська
  • فارسی 🇮🇷

If you want to add a language, create a pull request 💜


🐧 Running as service on linux

  1. Install Python 3.10, venv and pip

  2. Download source code

  3. Create venv python -m venv venv / python3 -m venv venv / python3.10 -m venv venv

  4. Clone repo

    1. git clone https://github.com/F33RNI/GPT-Telegramus/
    2. cd GPT-Telegramus
  5. Edit config.json

  6. Install systemd

    1. sudo apt-get install -y systemd
  7. Create new service file

    1. sudo nano /etc/systemd/system/gpt-telegramus.service

      [Unit]
      Description=GPT-Telegramus service
      After=multi-user.target
      
      [Service]
      Type=simple
      Restart=on-failure
      RestartSec=5
      
      WorkingDirectory=YOUR DIRECTORY HERE/GPT-Telegramus
      ExecStart=YOUR DIRECTORY HERE/GPT-Telegramus/run.sh
      
      [Install]
      WantedBy=multi-user.target
      
  8. Reload systemctl daemon

    1. sudo systemctl daemon-reload
  9. Enable and start service

    1. sudo systemctl enable gpt-telegramus
    2. sudo systemctl start gpt-telegramus
  10. Note: Please use sudo systemctl kill gpt-telegramus and then sudo systemctl stop gpt-telegramus if only sudo systemctl stop gpt-telegramus not working


🍓 Running on Raspberry Pi (ARM)

  1. Install Python 3.10 if not installed

    1. sudo apt-get update
      sudo apt-get install -y build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev
      wget https://www.python.org/ftp/python/3.10.13/Python-3.10.13.tgz
      sudo tar zxf Python-3.10.13.tgz
      cd Python-3.10.13
      sudo ./configure --enable-optimizations
      sudo make -j 4
      sudo make altinstall
    2. Check version by typing python3.10 -V. After this, you should use python3.10 command instead of python or you can add it to the bashrc by typing echo "alias python=/usr/local/bin/python3.10" >> ~/.bashrc

  2. For ChatGPTProxy, install GO and tls-client

    1. sudo apt-get install golang-go
      
      git clone https://github.com/bogdanfinn/tls-client.git
      cd tls-client/cffi_dist
      sudo GOOS=linux CGO_ENABLED=1 GOARCH=arm64 CC="gcc" /usr/local/go/bin/go build -buildmode=c-shared -o tls-client-arm64.so
      mv ./dist/tls-client-arm64.so /home/pi/.local/lib/python3.10/site-packages/tls_client/dependencies/
      mv ./dist/tls-client-arm64.h /home/pi/.local/lib/python3.10/site-packages/tls_client/dependencies/
  3. Build ChatGPTProxy

    1. git clone https://github.com/acheong08/ChatGPTProxy
      /usr/local/go/bin/go build
    2. Create and start service as mention in the 🔗 Chat-GPT Base URL (proxy) section

  4. Follow the 🐧 Running as service on linux guide

🐋 Running in Docker

From GitHub Package

  1. Clone repo or download config.json and messages.json

  2. Edit the config.json, set options in the files section to the path in the container (/app/config/<FILE_NAME>)

  3. Run the container

    docker run -d -e TELEGRAMUS_CONFIG_FILE="/app/config/config.json" -v <YOUR_CONFIG_FOLDER>:/app/config --name gpt-telegramus --restart on-failure ghcr.io/f33rni/gpt-telegramus:latest

    If you want to try the preview version

    docker run -d -e TELEGRAMUS_CONFIG_FILE="/app/config/config.json" -v <YOUR_CONFIG_FOLDER>:/app/config --name gpt-telegramus --restart on-failure ghcr.io/f33rni/gpt-telegramus:edge

Build Manually

  1. Install Docker

  2. Clone repo

  3. Build container

    docker buildx build -t telegramus --load -f Dockerfile .
  4. Run the container

    docker run -d --name gpt-telegramus --restart on-failure telegramus

    or if you want to use a custom config

    docker run -d -e TELEGRAMUS_CONFIG_FILE="/app/config/config.json" -v <YOUR_CONFIG_FOLDER>:/app/config --name gpt-telegramus --restart on-failure telegramus

🔗 Chat-GPT Base URL (proxy)

Default base URL by acheong08/ChatGPT stopped working. Below is an instruction on how to launch your own ChatGPT proxy server (on Linux)

  1. Install GO

    1. sudo apt-get update
    2. sudo apt-get install golang-go
  2. Clone acheong08/ChatGPTProxy repo

    1. git clone https://github.com/acheong08/ChatGPTProxy
    2. cd ChatGPTProxy
  3. Build it

    1. go build
  4. Install systemd

    1. sudo apt-get install systemd
  5. Create service

    1. sudo nano /etc/systemd/system/chatgpt-proxy.service

      [Unit]
      Description=ChatGPTProxy service
      After=multi-user.target
      
      [Service]
      Type=simple
      Restart=on-failure
      RestartSec=5
      
      # Proxy (if needed, or remove this and next line)
      Environment="http_proxy=http://USERNAME:PASSWORD@IP:PORT"
      
      # ChatGPT login
      Environment="OPENAI_EMAIL=YOUR_EMAIL"
      Environment="OPENAI_PASSWORD=YOUR_PASSWORD"
      
      WorkingDirectory=PATH_TO_ChatGPTProxy_DIRECTORY
      ExecStart=PATH_TO_ChatGPTProxy_DIRECTORY/ChatGPTProxy
      
      [Install]
      WantedBy=multi-user.target
      
  6. Reload systemctl daemon

    1. sudo systemctl daemon-reload
  7. Enable and start service

    1. sudo systemctl enable chatgpt-proxy
    2. sudo systemctl start chatgpt-proxy
  8. See logs to make sure it's running and see current port

    1. systemctl status chatgpt-proxy
  9. Add it's IP to config.json

    1. ex. "base_url": "http://127.0.0.0:9090/api/",

🌎 Proxy to bypass geo-blocking

NOT TESTED AND MOST LIKELY WILL NOT WORK WITH BARD AND BING AI

I won't respond to the issue if it's related to auto proxy

It is possible to bypass geo-blocking of ChatGPT, EdgeGPT, DALL-E or Bard. GPT-Telegramus includes automatic proxy-list downloading with periodic checks

  1. Set enabled in proxy_automation in config.json to true
  2. Set auto in proxy for modules you want to connect automatic proxy search
  3. Restart app and hope for the best.

GPT-Telegramus will download the proxy list itself and start trying various proxies (see console for logs). Sometimes, searching for a proxy can take a long time. If you think that the found proxy is not suitable, you can restart the bot using the /restart command

  • To use manual proxy, specify tham in http://IP:Port or http://user:password@IP:Port format (even if they are HTTPS proxies) in proxy for modules you need

🤖 Telegram bot commands

  • 📄 /start - Welcome message and bot version
  • /help - Show this message
  • ↕️ /module - Change module to chat with
  • 🧹 /clear - Clear chat history
  • 🌎 /lang - Change the language
  • 🆔 /chatid - Show your chat_id
  • /style - Bing AI conversation style
  • /chat <Text request> - Request to the default module
  • /chatgpt <Text request> - Request to the ChatGPT module
  • /dalle <Text request> - Request to the DALL-E module
  • /bing <Text request> - Request to the Bing AI module
  • /bingigen <Text request> - Request to the Bing Image Generator
  • /bard <Text request> - Request to the Bard module
  • /gemini <Text request> - Request to the Gemini module

Admin commands

  • 💬 /queue - Show requests queue
  • 🔃 /restart - Restart proxies and telegram bot
  • 👤 /users - Show list of all users
  • 🔨 /ban <id> [reason] - Ban a user by their id with reason (optional)
  • 🔓 /unban <id> - Unban a user by their id
  • 📢 /broadcast <message> - Send text message to everyone except banned users

📄 Chat history

GPT-Telegramus saves chat history for some modules locally ("conversations_dir": "conversations") to keep conversation with users


📜 Data collecting

GPT-Telegramus has a built-in data collecting function (request and response)

  • For ChatGPT, EdgeGPT (aka Bing AI), Bard and Gemini response is saved as plain text and Base64-encoded images
  • For DALL-E and Bing Image generator response is saved as Base64-encoded image (in the same text file)

You can enable and configure data collection in config in data_collecting block

NOTE: Please make sure you notify your bot users that you are collecting data


📝 TODO

  • Add some free GPT-4 model
  • Add image input and generation for EdgeGPT (and ChatGPT?)
  • Add Bard's text-to-speech
  • Add an API, so you can use GPT-Telegramus from outside the bot

✨ Contribution

  • Anyone can contribute! Just create a pull request

🚧 P.S. This project is still under development

  • If you find a bug in GPT-Telegramus, please create an Issue

More Repositories

1

OpenEmbroidery

Open source embroidery machine project
C++
31
star
2

NTSC-VHS-Renderer

Intuitive rendering and GUI for LMP88959/NTSC-CRT with effects
Cython
30
star
3

LlM-Api-Open

Unofficial open APIs for popular LLMs (currently for ChatGPT and MS Copilot) with self-hosted redirect capability
Python
28
star
4

Liberty-X

STM32-based multicopter flight controller
C++
13
star
5

Liberty-Way

Stabilization and landing system for multicopters
Java
9
star
6

SonicEval

Audio Quality Measurement Software
Python
5
star
7

Webinar-hacker

Automatic lectures recording and transcription on the webinar.ru platform
Python
5
star
8

PiPo-Ballus

Ball balancing PID table
Java
5
star
9

QPSK-mod-demod-libs

C-libraries for QPSK modulation and demodulation
C
5
star
10

ANMAK

AN-Motors Arduino Keyfob
C++
4
star
11

SeismoHome

MPU-6050 based earthquake detector with alarm, uninterruptible power supply, data logging and web interface
JavaScript
4
star
12

GPS-to-Serial

App to send phone GPS coordinates via USB serial port
Java
4
star
13

PetalFlow

A pure C light-weight library for machine learning
C
3
star
14

QPSK-Demo

Demonstration of a QPSK modulator / demodulator in the audio range (with the ability to run it through a real speaker / mic)
Python
3
star
15

RX5808-ABFC

RX5808 Arduino-based frequency changer
C++
3
star
16

PetalVault

Secure offline multi-vault password manager with QR code-based synchronization
Python
3
star
17

curseforge-modpack-downloader

Simple zero-dependency Python script for downloading and updating CurseForge modpacks
Python
3
star
18

Curlion

Hair curler temperature controller project
C++
2
star
19

Podmiha

App to help you pass online exams
Python
2
star
20

Mango-Eye

Surveillance camera app with motion detection and simple web server
Java
2
star
21

Mass-Replacer

Block replacing in the entire Minecraft world
Java
2
star
22

EP_1_1_AR

Engineering project for 6 (summer) semester
C#
2
star
23

PRRC

Programmable Rainbow Redstone Computer
Python
2
star
24

PetalVault-Android

Secure offline multi-vault password manager with QR code-based synchronization
Java
2
star
25

LMSDownloader

Download presentations and lectures from LMS using Chrome in headless mode
Python
2
star
26

LMSDownloader-telegram-bot

Telegram bot for downloading presentations and lectures from LMS using headless Chrome
Python
2
star
27

DataSer

Image dataset generator for training neural networks. Capable of randomly modifying various image parameters, enhancing the image dataset
Python
2
star
28

FloppyCat

Simple high-performance utility for creating and validating checksums-based backups with full multiprocessing support and retro GUI
Python
2
star
29

Host-Rover-test

Test software for communication between (Orange Pi based rover) and host (computer)
Python
2
star
30

vk-new-captcha-solver

New (russian) VK captcha solver with built-in server / Решатель новых капч ВК (с русскими символами) со встроенным сервером
Python
2
star
31

micro-minecraft-launcher

Simple cross-platform cli launcher for Minecraft
Python
2
star
32

DoDCaPS_LR3

Разработка систем сбора и обработки данных. Лабораторно-практическое задание № 3
Python
1
star
33

Pro_Ceed_2-Lights

Control system for two RGB strips for the Robocar project
C++
1
star
34

IoT_Laboratory_work_1

Variant 11
C++
1
star
35

PyToArduinoVideo

Python to Arduino video converter
C++
1
star
36

DVT_LR3

Технологии визуализации данных систем управления Лабораторная работа № 3
Python
1
star
37

in17clock

IN17 Nixie tube clock with internal DC-DC converter, random melody alarm and temperature/humidity sensor
C++
1
star
38

AMLS_On_Board

C++
1
star
39

ResistorVision

Python application for determining resistor values using machine vision
Python
1
star
40

PyColumnizer

Classic UNIX-style real-time text formatter with unicode and pipe support
Python
1
star
41

Liberty-X_Point

Python
1
star
42

EP_TVZSU_1.1

Инженерный проект за 6 (летний) семестр
Python
1
star
43

Eitude

AMLS Platform controller
C++
1
star
44

ESDT

Лабораторные работы по "Технологии программирования инженерных систем"
C#
1
star
45

Smartbus_MMS

Main motor system
C++
1
star
46

ROS_LR_1

Лабораторная работа по "Практикум по робототехнике", 8 семестр
Python
1
star
47

NSvZTZiU

Лабораторные работы по "Нейронные сети в задачах технического зрения и управления"
Python
1
star
48

Telegram-blockpost-bot

A simple telegram bot that collects requests for joining a group
Python
1
star
49

Transceiver-AMLS-Library

This library is a part of AMLS project
C++
1
star
50

DVT_LR2

Технологии визуализации данных систем управления Лабораторная работа № 2
Python
1
star
51

DVT_LR4

Технологии визуализации данных систем управления Лабораторная работа № 4
Python
1
star
52

EP_Split_and_Merge

Инженерный проект за 5 (зимний) семестр. Вариант Split & Merge
Python
1
star
53

Steering_Motor_Controller

C++
1
star
54

SFP_smartControl

Версия только с датчиками
C++
1
star
55

DVT_LR1

Технологии визуализации данных систем управления Лабораторно практическая работа № 1
Python
1
star
56

SFP_pinkFarm

Версия только с подсветкой
C++
1
star
57

CMCEC

Cheap MIDI to CV Eurorack Converter
C++
1
star
58

DoDCaPS_LR4

Разработка систем сбора и обработки данных. Лабораторно-практическое задание № 4
Python
1
star
59

DoDCaPS_LR2

Разработка систем сбора и обработки данных. Лабораторно-практическое задание № 2
Python
1
star
60

chain-idle

TypeScript
1
star
61

DoDCaPS_LR1

Разработка систем сбора и обработки данных. Лабораторно-практическое задание № 1
Python
1
star
62

SMART_flowerpot

SMART Self-controlled Flower Pot + IoT (Thingworx®)
C++
1
star
63

SFP_homeEdition

Версия только с помпой и таймером
C++
1
star
64

Handwrittner-processor

Processor for correcting images from handwrittner.com for printing
Python
1
star
65

destinys-cards

Tarot card reading app
JavaScript
1
star
66

Development-of-mobile-applications-for-Android-Labs

Разработка мобильных приложений для Android
Java
1
star
67

PetalPID

Lightweight universal PID controller library with Ziegler–Nichols auto tuning and variable cycle time
C++
1
star
68

ilet-103-motor-controller

Digital speed controller for ILET 103 reel-to-reel deck | Цифровой контроллер скорости ленты катушечного магнитофона ИЛЕТЬ 103
C++
1
star