Coder Social home page Coder Social logo

omarhackpro / tg-gemini-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from winniesi/tg-gemini-bot

0.0 0.0 0.0 1.92 MB

Just a single click and you've got it set up on Vercel.

Home Page: https://tg-gemini-bot.vercel.app

License: MIT License

Python 80.50% HTML 19.50%

tg-gemini-bot's Introduction

tg-gemini-bot

The tg-gemini-bot let's you use Google Gemini services right on your personal Telegram bot.

Super easy, just a single click and you've got it set up on Vercel.

screen

Features

  • This is built with Flask - super straightforward and easy to develop.
  • It's an all front-end project, and you can get it up and running on Vercel with just one click.
  • Supports Gemini continuous conversation. (Due to Vercel's restrictions, conversations may not be saved for a long time)
  • Supports both Gemini text, image interface, and telegram markdown.

Preparation

Get these things ready, and then fill them in as environment variables in Vercel.

  • GOOGLE_API_KEY

    apply for your Google gemini pro api: https://makersuite.google.com/app/apikey

  • BOT_TOKEN

    create your own telegram bot (check the tutorial), obtain the token of the bot, which is in the format similar to: 67295022320:AAHmfuSQb0ZoUq0ycNPvgzqCCX7I1uzzaSE

  • ALLOWED_USERS

    Gather the Telegram usernames of users who are permitted to access this bot, separating them with a comma (,). The usernames should be formatted like this: name1,name2. Including the @ symbol is optional, so either ohmorningsir or @ohmorningsir is acceptable.

Get Started

  1. Click Deploy with Vercel to deploy to Vercel.
  2. Set the environment variable according to the instructions below.
  3. Once everything's done, visit the domain name of your Vercel project address.
  4. Fill in your telegram bot token on the page to associate telegram bot and vercel.

update_telegram_bot

Environment Variable

Environment Variable Required Description
GOOGLE_API_KEY Yes Your Google gemini pro api, it looks like AI2aS4Cl55F9ni9WN84Qn_KWRSuqXvUWkPq6kovc
BOT_TOKEN Yes The Telegram bot token you applied for, it looks like 67295022320:AAHmfuSQb0ZoUq0ycNPvgzqCCX7I1uzzaSE
ALLOWED_USERS Yes List the allowed Telegram usernames. If there's more than one person, just split them with , and it should look like: name1,name2.

tg-gemini-bot's People

Contributors

copenart avatar winniesi 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.