Giter Club home page Giter Club logo

doppleganger-telegram-bot's Introduction

Telegram bot for clone doppleganger

A Telegram bot you can deploy to mimick the way you talk! Fine tune a LLM on your own telegram messages.

Credits and inspiration to fusiousteabag who helped me with the fine tuning - repo

Credits and inspiration to shamspias on how to build a telegram bot with langchain - repo

Installation

Requirements

  • Python 3.11 was used (best to create a virtual environment using conda on venv)
  • run pip install -r requirements.txt
  • run your own local open source LLM api endpoint server (for this project i used textgen-webui). You will need to start your textgen-webui server with the --api flag to generate an api endpoint that the bot will call to generate responses. Refer to the textgen-webui repo for more details.
  • create a .env file and update your variables with your own telegram bot token, your own name, your own LLM api endpoint. refer to .env.example for the variables you need to set. Your final .env file should look like the .env.example except with your own variables.
  • refer to this to get your own telegram bot token

Running the bot

run the following command

python run_bot.py

Fine Tuning

Refer more to furiousteabag repo and blog to see how he got his telegram messages and prepared the dataset for fine tuning. The methods used for fine tuning he also discussed and evaluated in his blog. Brilliant stuff!

Libraries used

  • tiktoken (to calculate tokens)
  • langchain (easy api to connect llm endpoints in python)
  • pyTelegramBotAPI (python api to interface with telegram)

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.