Giter Club home page Giter Club logo

gemini-telegram-bot's Introduction

Gemini_Telegram_Bot

一个使用 Gemini API 的 Telegram 机器人English ducument

Demo

点这里

如何安装

(1) Linux系统

  1. 安装依赖
pip install -r requirements.txt
  1. BotFather获取Telegram Bot API
  2. Google AI Studio获取Gemini API keys
  3. 运行机器人,执行以下命令:
python main.py ${Telegram 机器人 API} ${Gemini API 密钥}

(2)使用 Docker 部署

自行构建

  1. BotFather获取Telegram Bot API
  2. Google AI Studio获取Gemini API keys
  3. 克隆项目
git clone https://github.com/H-T-H/Gemini-Telegram-Bot.git
  1. 进入项目目录
cd Gemini-Telegram-Bot
  1. 构建镜像
docker build -t gemini_tg_bot .
  1. 运行镜像
docker run -d --restart=always -e TELEGRAM_BOT_API_KEY={Telegram 机器人 API} -e GEMINI_API_KEYS={Gemini API 密钥} gemini_tg_bot

(3)使用 Railway 部署

点击下方按钮一键部署

Deploy on Railway

(4)使用 Zeabur 部署

点击下方按钮一键部署

Deploy on Zeabur

使用方法

  1. 私聊中直接发送你的问题即可
  2. 群组中使用 /gemini 或者 /gemini_pro +你的问题
  3. 删除对话的历史记录请使用 /clear
  4. 切换私聊中默认调用的模型请使用 /switch

参考信息

  1. https://github.com/yihong0618/tg_bot_collections
  2. https://github.com/yym68686/md2tgmd/blob/main/src/md2tgmd.py

Star History

Star History Chart

gemini-telegram-bot's People

Contributors

h-t-h avatar michaelyuhe avatar ferstar 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.