<div align="center">
<a href="https://v2.nonebot.dev/store"><img src="https://s2.loli.net/2024/12/05/97BPodAZpy4GEuh.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
<br>
<p><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/NoneBotPlugin.svg" width="240" alt="NoneBotPluginText"></p>
</div>
<div align="center">
# nonebot-plugin-multimodal-gemini
_✨Nonebot2 的谷歌 Gemini 多模态助手,一个命令即可玩转 Gemini 的多模态!✨_
<a href="./LICENSE">
<img src="https://img.shields.io/github/license/owner/nonebot-plugin-multimodal-gemini.svg" alt="license">
</a>
<a href="https://pypi.org/project/nonebot-plugin-multimodal-gemini/">
<img src="https://img.shields.io/pypi/v/nonebot-plugin-multimodal-gemini.svg" alt="pypi">
</a>
<img src="https://img.shields.io/badge/python-3.9+-blue.svg" alt="python">
</div>
## 💿 安装
<details open>
<summary>使用 nb-cli 安装</summary>
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-multimodal-gemini
</details>
<details>
<summary>使用包管理器安装</summary>
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
<details>
<summary>pip</summary>
pip install nonebot-plugin-multimodal-gemini
</details>
<details>
<summary>pdm</summary>
pdm add nonebot-plugin-multimodal-gemini
</details>
<details>
<summary>poetry</summary>
poetry add nonebot-plugin-multimodal-gemini
</details>
<details>
<summary>conda</summary>
conda install nonebot-plugin-multimodal-gemini
</details>
打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入
plugins = ["nonebot-plugin-multimodal-gemini"]
</details>
> [!IMPORTANT]
> 请确保已安装可用的浏览器, 如有关于缺失浏览器的报错, 请尝试进入Bot虚拟环境 (如果有) 并运行`playwright install`命令
## ⚙️ 配置
| 配置项 | 必填 | 默认值 | 说明 |
|:-----:|:----:|:----:|:--------------:|
| gm_api_key | 是 | 无 | [Gemini API Key](https://aistudio.google.com/app/apikey?) |
| gm_model | 否 | gemini-2.0-flash-exp | Gemini 模型 |
| gm_prompt | 否 | 请用中文回答以下问题: | 提示词(不要设置太长) |
| gm_proxy | 否 | 无 | 插件使用的代理地址,格式为`http://<ip>:<port>` |
| gm_search | 否 | True | 是否启用Gemini附带搜索 |
> [!NOTE]
> Gemini附带搜索功能需使用gemini-2.0-flash-exp模型, 非此模型将默认使用LLM爬虫搜索
## 🎉 使用
### 指令表
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|:---------------:|:----:|:----:|:-----:|:----:|
| gemini / Gemini | 群员 | 否 | 群聊 | 指令说明 |
### 效果图
![](https://s2.loli.net/2024/12/05/2toGhBxZLzeHk9V.png)
## 🌼 贡献
同时感谢以下开发者对 `Nonebot - Gemini 多模态助手` 作出的贡献:
<a href="https://github.com/zhiyu1998/nonebot-plugin-multimodal-gemini/graphs/contributors">
<img src="https://contrib.rocks/image?repo=zhiyu1998/nonebot-plugin-multimodal-gemini&max=1000" />
</a>
Raw data
{
"_id": null,
"home_page": "https://github.com/zhiyu1998/nonebot-plugin-multimodal-gemini",
"name": "nonebot-plugin-multimodal-gemini",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "nonebot, nonebot2, gemini",
"author": "zhiyu1998",
"author_email": "renzhiyu0416@qq.com",
"download_url": "https://files.pythonhosted.org/packages/92/73/3cf9fec13118da42d8429a97967f36a83392b706f97d4bc74af5657712ad/nonebot_plugin_multimodal_gemini-0.1.1.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n <a href=\"https://v2.nonebot.dev/store\"><img src=\"https://s2.loli.net/2024/12/05/97BPodAZpy4GEuh.png\" width=\"180\" height=\"180\" alt=\"NoneBotPluginLogo\"></a>\n <br>\n <p><img src=\"https://github.com/A-kirami/nonebot-plugin-template/blob/resources/NoneBotPlugin.svg\" width=\"240\" alt=\"NoneBotPluginText\"></p>\n</div>\n\n<div align=\"center\">\n\n# nonebot-plugin-multimodal-gemini\n\n_\u2728Nonebot2 \u7684\u8c37\u6b4c Gemini \u591a\u6a21\u6001\u52a9\u624b\uff0c\u4e00\u4e2a\u547d\u4ee4\u5373\u53ef\u73a9\u8f6c Gemini \u7684\u591a\u6a21\u6001\uff01\u2728_\n\n<a href=\"./LICENSE\">\n <img src=\"https://img.shields.io/github/license/owner/nonebot-plugin-multimodal-gemini.svg\" alt=\"license\">\n</a>\n<a href=\"https://pypi.org/project/nonebot-plugin-multimodal-gemini/\">\n <img src=\"https://img.shields.io/pypi/v/nonebot-plugin-multimodal-gemini.svg\" alt=\"pypi\">\n</a>\n<img src=\"https://img.shields.io/badge/python-3.9+-blue.svg\" alt=\"python\">\n\n</div>\n\n## \ud83d\udcbf \u5b89\u88c5\n\n<details open>\n<summary>\u4f7f\u7528 nb-cli \u5b89\u88c5</summary>\n\u5728 nonebot2 \u9879\u76ee\u7684\u6839\u76ee\u5f55\u4e0b\u6253\u5f00\u547d\u4ee4\u884c, \u8f93\u5165\u4ee5\u4e0b\u6307\u4ee4\u5373\u53ef\u5b89\u88c5\n\n nb plugin install nonebot-plugin-multimodal-gemini\n\n</details>\n\n<details>\n<summary>\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u5b89\u88c5</summary>\n\u5728 nonebot2 \u9879\u76ee\u7684\u63d2\u4ef6\u76ee\u5f55\u4e0b, \u6253\u5f00\u547d\u4ee4\u884c, \u6839\u636e\u4f60\u4f7f\u7528\u7684\u5305\u7ba1\u7406\u5668, \u8f93\u5165\u76f8\u5e94\u7684\u5b89\u88c5\u547d\u4ee4\n\n<details>\n<summary>pip</summary>\n\n pip install nonebot-plugin-multimodal-gemini\n</details>\n<details>\n<summary>pdm</summary>\n\n pdm add nonebot-plugin-multimodal-gemini\n</details>\n<details>\n<summary>poetry</summary>\n\n poetry add nonebot-plugin-multimodal-gemini\n</details>\n<details>\n<summary>conda</summary>\n\n conda install nonebot-plugin-multimodal-gemini\n</details>\n\n\u6253\u5f00 nonebot2 \u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u7684 `pyproject.toml` \u6587\u4ef6, \u5728 `[tool.nonebot]` \u90e8\u5206\u8ffd\u52a0\u5199\u5165\n\n plugins = [\"nonebot-plugin-multimodal-gemini\"]\n\n</details>\n\n> [!IMPORTANT]\n> \u8bf7\u786e\u4fdd\u5df2\u5b89\u88c5\u53ef\u7528\u7684\u6d4f\u89c8\u5668, \u5982\u6709\u5173\u4e8e\u7f3a\u5931\u6d4f\u89c8\u5668\u7684\u62a5\u9519, \u8bf7\u5c1d\u8bd5\u8fdb\u5165Bot\u865a\u62df\u73af\u5883 (\u5982\u679c\u6709) \u5e76\u8fd0\u884c`playwright install`\u547d\u4ee4\n\n## \u2699\ufe0f \u914d\u7f6e\n\n| \u914d\u7f6e\u9879 | \u5fc5\u586b | \u9ed8\u8ba4\u503c | \u8bf4\u660e |\n|:-----:|:----:|:----:|:--------------:|\n| gm_api_key | \u662f | \u65e0 | [Gemini API Key](https://aistudio.google.com/app/apikey?) |\n| gm_model | \u5426 | gemini-2.0-flash-exp | Gemini \u6a21\u578b |\n| gm_prompt | \u5426 | \u8bf7\u7528\u4e2d\u6587\u56de\u7b54\u4ee5\u4e0b\u95ee\u9898\uff1a | \u63d0\u793a\u8bcd\uff08\u4e0d\u8981\u8bbe\u7f6e\u592a\u957f\uff09 |\n| gm_proxy | \u5426 | \u65e0 | \u63d2\u4ef6\u4f7f\u7528\u7684\u4ee3\u7406\u5730\u5740\uff0c\u683c\u5f0f\u4e3a`http://<ip>:<port>` |\n| gm_search | \u5426 | True | \u662f\u5426\u542f\u7528Gemini\u9644\u5e26\u641c\u7d22 |\n\n> [!NOTE]\n> Gemini\u9644\u5e26\u641c\u7d22\u529f\u80fd\u9700\u4f7f\u7528gemini-2.0-flash-exp\u6a21\u578b, \u975e\u6b64\u6a21\u578b\u5c06\u9ed8\u8ba4\u4f7f\u7528LLM\u722c\u866b\u641c\u7d22\n\n## \ud83c\udf89 \u4f7f\u7528\n\n### \u6307\u4ee4\u8868\n| \u6307\u4ee4 | \u6743\u9650 | \u9700\u8981@ | \u8303\u56f4 | \u8bf4\u660e |\n|:---------------:|:----:|:----:|:-----:|:----:|\n| gemini / Gemini | \u7fa4\u5458 | \u5426 | \u7fa4\u804a | \u6307\u4ee4\u8bf4\u660e |\n\n### \u6548\u679c\u56fe\n\n![](https://s2.loli.net/2024/12/05/2toGhBxZLzeHk9V.png)\n\n## \ud83c\udf3c \u8d21\u732e\n\n\u540c\u65f6\u611f\u8c22\u4ee5\u4e0b\u5f00\u53d1\u8005\u5bf9 `Nonebot - Gemini \u591a\u6a21\u6001\u52a9\u624b` \u4f5c\u51fa\u7684\u8d21\u732e\uff1a\n\n<a href=\"https://github.com/zhiyu1998/nonebot-plugin-multimodal-gemini/graphs/contributors\">\n <img src=\"https://contrib.rocks/image?repo=zhiyu1998/nonebot-plugin-multimodal-gemini&max=1000\" />\n</a>\n",
"bugtrack_url": null,
"license": null,
"summary": "Nonebot2 \u7684\u8c37\u6b4c Gemini \u591a\u6a21\u6001\u52a9\u624b\uff0c\u4e00\u4e2a\u547d\u4ee4\u5373\u53ef\u73a9\u8f6c Gemini \u7684\u591a\u6a21\u6001\uff01",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/zhiyu1998/nonebot-plugin-multimodal-gemini",
"Repository": "https://github.com/zhiyu1998/nonebot-plugin-multimodal-gemini"
},
"split_keywords": [
"nonebot",
" nonebot2",
" gemini"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1a2983aad1da46bd815c11557c94fd70b3b884569f70cf31fa03230026f05330",
"md5": "9ce308bde36f4c9a5b712e9789a0edb3",
"sha256": "5a9e01156cad2cc01ad99e38fd5a22d7140dd1b1677a6963b9e5c8cea23856e1"
},
"downloads": -1,
"filename": "nonebot_plugin_multimodal_gemini-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9ce308bde36f4c9a5b712e9789a0edb3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 9669,
"upload_time": "2024-12-25T00:17:26",
"upload_time_iso_8601": "2024-12-25T00:17:26.548297Z",
"url": "https://files.pythonhosted.org/packages/1a/29/83aad1da46bd815c11557c94fd70b3b884569f70cf31fa03230026f05330/nonebot_plugin_multimodal_gemini-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "92733cf9fec13118da42d8429a97967f36a83392b706f97d4bc74af5657712ad",
"md5": "3def6e1d76482f7e84af45f6eeedd027",
"sha256": "3a8181c2c03e9a9a1b3a11de4d19c612e991a6650e89db627bfa988249492807"
},
"downloads": -1,
"filename": "nonebot_plugin_multimodal_gemini-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "3def6e1d76482f7e84af45f6eeedd027",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 8191,
"upload_time": "2024-12-25T00:17:28",
"upload_time_iso_8601": "2024-12-25T00:17:28.819596Z",
"url": "https://files.pythonhosted.org/packages/92/73/3cf9fec13118da42d8429a97967f36a83392b706f97d4bc74af5657712ad/nonebot_plugin_multimodal_gemini-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-25 00:17:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "zhiyu1998",
"github_project": "nonebot-plugin-multimodal-gemini",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "nonebot-plugin-multimodal-gemini"
}