{"id":13628260,"url":"https://github.com/zhuchangyi/Gemini2tg","last_synced_at":"2025-04-17T00:33:51.386Z","repository":{"id":212933987,"uuid":"732643213","full_name":"zhuchangyi/Gemini2tg","owner":"zhuchangyi","description":"Gemini2tg is a project which deploys Google Gemini's API to a Telegram bot, giving you your own AI bot powerd by Gemini","archived":false,"fork":false,"pushed_at":"2024-03-23T06:11:39.000Z","size":627,"stargazers_count":22,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-04T23:32:43.513Z","etag":null,"topics":["bot","docker","dockerfile","gemini","gemini-pro","gemini-pro-vision","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhuchangyi.png","metadata":{"files":{"readme":"README.cn.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-17T11:25:55.000Z","updated_at":"2024-05-04T23:32:45.265Z","dependencies_parsed_at":"2023-12-21T14:12:22.080Z","dependency_job_id":"301e2203-8420-4c66-b305-c7b5cecd3861","html_url":"https://github.com/zhuchangyi/Gemini2tg","commit_stats":null,"previous_names":["zhuchangyi/gemini2tg"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhuchangyi%2FGemini2tg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhuchangyi%2FGemini2tg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhuchangyi%2FGemini2tg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhuchangyi%2FGemini2tg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhuchangyi","download_url":"https://codeload.github.com/zhuchangyi/Gemini2tg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249293246,"owners_count":21245710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","docker","dockerfile","gemini","gemini-pro","gemini-pro-vision","telegram-bot"],"created_at":"2024-08-01T22:00:49.277Z","updated_at":"2025-04-17T00:33:51.098Z","avatar_url":"https://github.com/zhuchangyi.png","language":"Python","funding_links":[],"categories":["GitHub projects"],"sub_categories":[],"readme":"[English version](README.en.md)\n# Gemini2TG\n\nGemini2TG 是一个将Google Gemini的API部署到Telegram机器人的项目，让你拥有属于自己的ai机器人。  \n1. 本脚本集成了Google Gemini Pro和Google Gemini Pro Vision，不需要手动切换。  \n2. 输入文本的时候就是使用Google Gemini Pro，输入图片加文本就是使用Gemini Pro Vision。  \n3. 并且Google Gemini Pro 支持上下文语境。\n4. 输入/start可以开始新对话\n\n\n\n\n## 获取API密钥\n\n在开始使用 Gemini2TG 之前，您需要获取一个Google API密钥。\n\n1. 点击这里获取GOODLE GEMINI API [获取Google Gemini API](https://makersuite.google.com/app/apikey)。\n2. 点击这里获取TELEGRAM BOT API [获取TELEGRAM BOT API](https://telegram.me/BotFather)。\n\n\n## 安装与配置\n### Docker \n```#bash\nwget -O setup.sh https://raw.githubusercontent.com/zhuchangyi/Gemini2tg/main/setup.sh \u0026\u0026 chmod +x setup.sh \u0026\u0026 ./setup.sh\nwget -O Dockerfile https://raw.githubusercontent.com/zhuchangyi/Gemini2tg/main/Dockerfile\n```\n```#bash\ndocker build -t gemini2tg .\ndocker run -v \"$(pwd)/config.json:/app/config.json\" gemini2tg\n```\n### 直接安装\n我用的系统是Ubuntu\n```#bash\nwget -O gemini2tg.sh https://raw.githubusercontent.com/zhuchangyi/Gemini2tg/main/gemini2tg.sh \u0026\u0026 chmod +x gemini2tg.sh \u0026\u0026 ./gemini2tg.sh \n```\n脚本会自动配置python环境，过程中会要求用户输入2个apikey，脚本运行成功后就与自己的bot聊天啦。  \n## 关闭后台运行  \n```#bash\nSCRIPT_NAME=\"script.py\"\nPID=$(ps aux | grep $SCRIPT_NAME | grep -v \"grep\" | awk '{print $2}')\nif [ -z \"$PID\" ]; then\n    echo \"Process not found.\"\nelse\n    echo \"Killing process with PID: $PID\"\n    sudo kill $PID\nfi\n```\n## samples  \n![text test](https://github.com/zhuchangyi/Gemini2tg/blob/main/test.png \"test\")\n![vison test](https://github.com/zhuchangyi/Gemini2tg/blob/main/vision_test.png \"vison_test\")\n\n## Todo\n- [ ] 增加历史对话选项\n- [ ] 新增模型选择框\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhuchangyi%2FGemini2tg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhuchangyi%2FGemini2tg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhuchangyi%2FGemini2tg/lists"}