Giter Site home page Giter Site logo

swiftbot's Introduction

SwiftBot

SwiftBot is an interactive Telegram bot designed to facilitate engaging conversations with the Gemini AI generative model, powered by Google. It offers various functionalities, including saving and loading conversations, managing instructions, and updating user preferences such as language.

Features

  • Communicate with the Gemini Model: Engage in conversations with the Gemini using text or media.
  • Save and Load History: Easily save your conversation history and load it when needed.
  • Manage Instructions: Set and update system instructions to customize your interactions.
  • Change Language: Update your preferred language for interacting with the bot.
  • User-Friendly Menu: An accessible menu to navigate through different functionalities.
  • Queue-Based Messaging: All interactions are managed using queues to ensure smooth and efficient message handling.

Commands

  • /start - Start interacting with the bot and receive a welcome message.
  • /menu - Display the main menu with available options.
  • /setinst <instruction> - Set a new system instruction.
  • /delinst - Delete the current system instruction.
  • /save <history_name> - Save the conversation history with the specified name.
  • /delete <history_name> - Delete the specified conversation history.
  • /load <history_name> - Load a previously saved conversation history.
  • /clear - Clear the current conversation history.
  • /language <language_code> - Update the user's preferred language.

Deployment Instructions

Prerequisites

  • Python 3.7+
  • MongoDB instance
  • Telegram bot token (obtained via BotFather on Telegram)
  • Gemini API keys

1. Clone the Repository

git clone <repository-url>
cd <repository-name>

2. Set Up Environment Variables

Create a .env file in the project root directory and add the following configurations:

BOT_TOKEN=<YOUR_TELEGRAM_BOT_TOKEN>
GEMINI_API_KEYS=<YOUR_GEMINI_API_KEYS> (comma separated)
MONGO_URI=<YOUR_MONGODB_URI>
PROXY=<YOUR_PROXY>

3. Install Dependencies

pip install -r requirements.txt

4. Run

Start the bot:

python main.py

Your bot should now be running and ready to interact with users.

Contributing

Feel free to open issues or submit pull requests for any improvements or bug fixes.

swiftbot's People

Contributors

mradx avatar

Watchers

Kostas Georgiou avatar  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.