Giter Site home page Giter Site logo

v4kuri / telessist Goto Github PK

View Code? Open in Web Editor NEW

This project forked from t0mer/telessist

0.0 0.0 0.0 635 KB

Telessist allows you to contact GPT3 directly from WhatsApp and not only that. Telessist also allows you to save your own personal data and later search and retrieve it using GPT3 to generate a response. In the examples folder, you can see several examples of how to use this bot so you don't have to remember anything ever again.

License: GNU Affero General Public License v3.0

Python 95.65% Dockerfile 4.35%

telessist's Introduction

Telessist

Telessist allows you to contact GPT3 directly from Telegram and not only that. Telessist also allows you to save your own personal data and later search and retrieve it using GPT3 to generate a response. In the examples folder, you can see several examples of how to use this bot so you don't have to remember anything ever again.

Supported Features

  • No-Command: This is the default mode. The bot will respond to any message you send it through the GPT3 regular completion API.

  • Commands: This mode is activated by sending the bot a message starting with the command character. The default command character is /.

    • Currently supported commands:
      • /h: Show a help message that lists all the commands
      • /s : Save the message to the database
      • /q : Ask a question about the database and get a response from GPT3.
      • /f : Find related messages in the database.
      • /w: Get weather forecast from IMS.
      • Send audio file for transcription (Multi-languages).
      • d/ : Draw using Dall-E.
      • /c: Get OpenAI estimated costs
        • Today.
        • Yesterday.
        • Last 7 days.
        • Last 30 days.

Components and Frameworks used in Telessist

How to use Telessist

Telessist can be installed and run as a system service or a Docker container.

  1. Create new telegram bot and get the token Open Telegram messenger, sign in to your account or create a new one.

    Enter @Botfather in the search tab and choose this bot (Official Telegram bots have a blue checkmark beside their name.)

    @Botfather

    Click “Start” to activate BotFather bot.

    @start

    In response, you receive a list of commands to manage bots. Choose or type the /newbot command and send it.

    @newbot

    Choose a name for your bot — your subscribers will see it in the conversation. And choose a username for your bot — the bot can be found by its username in searches. The username must be unique and end with the word “bot.”

    @username

    After you choose a suitable name for your bot — the bot is created. You will receive a message with a link to your bot t.me/<bot_username>, recommendations to set up a profile picture, description, and a list of commands to manage your new bot.

    @bot_username

  2. Set the following environment variables:

    • BOT_TOKEN=#Telegram bot Token generated in the previous step.
    • OPENAI_KEY= #OpenAPI API key
    • ALLOWED_IDS= #List of telegram id's allowed to communicate with the bot, comma-separated values.
  3. If you want to run Telessist as a docker container, copy the following code into your docker-compose.yaml:

    version: "3.6"
    services:
    Telessist:
        image: techblog/Telessist
        container_name: Telessist
        restart: always
        ports:
        - 80:7020
        environment:
        - BOT_TOKEN= #Telegram bot Token.
        - OPENAI_KEY= #OpenAPI API key
        - ALLOWED_IDS= #List of telegram id's allowed to communicate with the bot, comma-separated values.
        volumes:
        - ./Telessist:/app/data

    **Make sure to set all the environment variables before running the "docker-compose up -d" command.

  4. If you want to run Telessist as a systemd service, clone the repository using the following command:

    git clone https://github.com/t0mer/Telessist

    enter the Telessist folder and install the dipendencies:

    pip3 install -r requirements.txt

    Next, create a file names "Telessist.service" under /etc/systemd/system" and paste the following content:

    [Unit]
    Description=GPT Telegram 
    After=network-online.target
    Wants=network-online.target systemd-networkd-wait-online.service
    StartLimitIntervalSec=5
    StartLimitBurst=5
    
    [Service]
    EnvironmentFile=/etc/environment
    KillSignal=SIGINT
    WorkingDirectory=/opt/dev/Telessist/app/
    Type=simple
    User=root
    ExecStart=/usr/bin/python3 /opt/dev/Telessist/app/app.py
    Restart=always
    
    [Install]
    WantedBy=multi-user.target

    Make sure to adjust the path for "WorkingDirectory" and "ExecStart" accordingly to the path of the Telessist location

    Next, run the following command to enable and start the service:

    systemctl enable assist. service
    systemctl start Telessist.service

    To check the status of the service, run the following command:

    systemctl status Telessist.servies

Acknowledgments

Huge credit and a special thanks to @mangate for creating SelfGPT which my code is based on.

telessist's People

Contributors

t0mer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.