Skip to content

dimasorik/gpt4-telegram-bot

Repository files navigation

gpt4-telegram-bot

Telegram Bot that is using AI GPT-4 version from the OpenAI company.

In order to use it - you will 2 things:

  1. Create Telegram Bot within telegram infa. The BotFather from Telegram will help you with that.
  2. Get GPT-4 API token from OpenAI. Details here.

Developer's instructions

This project is using python-poetry as a PYTHON PACKAGING AND DEPENDENCY MANAGEMENT.

Prerequisites

  1. Python >= 3.11 version
  2. Poetry >= 1.4.0 version

Running project locally

  1. Checkout && cd to the project's folder
  2. Install dependencies poetry install
  3. Export env variables export TELEGRAM_TOKEN=token && export OPENAI_TOKEN=token
  4. Run poetry run python gpt4_telegram_bot/gpt4_telegram_bot.py

Building and running docker image

  1. Set the tokens inside docker-compose.yaml
  2. Run docker-compose docker-compose up

Functionality

The current features of the bot:

  1. Pass the complete text chat to the OpenAI's GPT-4 and forwarding reply to it
  2. Reset the chat history with /restart command

Bot commands

Currenty supported commands:

  1. /restart - reset the chat history for GPT-4

About

GPT-4 Bot for the telegram

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published