Giter Club home page Giter Club logo

gemini2tg's Introduction

English version

Gemini2TG

Gemini2TG 是一个将Google Gemini的API部署到Telegram机器人的项目,让你拥有属于自己的ai机器人。

  1. 本脚本集成了Google Gemini Pro和Google Gemini Pro Vision,不需要手动切换。
  2. 输入文本的时候就是使用Google Gemini Pro,输入图片加文本就是使用Gemini Pro Vision。
  3. 并且Google Gemini Pro 支持上下文语境。
  4. 输入/start可以开始新对话

获取API密钥

在开始使用 Gemini2TG 之前,您需要获取一个Google API密钥。

  1. 点击这里获取GOODLE GEMINI API 获取Google Gemini API
  2. 点击这里获取TELEGRAM BOT API 获取TELEGRAM BOT API

安装与配置

我用的系统是Ubuntu

wget -O gemini2tg.sh https://raw.githubusercontent.com/zhuchangyi/Gemini2tg/main/gemini2tg.sh && chmod +x gemini2tg.sh && ./gemini2tg.sh 

脚本会自动配置python环境,过程中会要求用户输入2个apikey,脚本运行成功后就与自己的bot聊天啦。

关闭后台运行

SCRIPT_NAME="script.py"
PID=$(ps aux | grep $SCRIPT_NAME | grep -v "grep" | awk '{print $2}')
if [ -z "$PID" ]; then
    echo "Process not found."
else
    echo "Killing process with PID: $PID"
    sudo kill $PID
fi

samples

text test vison test

gemini2tg's People

Contributors

zhuchangyi 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.