<div align="center">
<a href="https://v2.nonebot.dev/store"><img src="https://source.cclmsy.cc/Images/nbp_Sparkapi/nbp_logo.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
<br>
<p><img src="https://source.cclmsy.cc/Images/nbp_Sparkapi/NoneBotPlugin.svg" width="240" alt="NoneBotPluginText"></p>
</div>
<div align="center">
# nonebot-plugin-multigpt
_✨一个多模态AI聊天插件✨_
<a href="./LICENSE">
<img src="https://img.shields.io/github/license/syagina/nonebot-plugin-multigpt.svg" alt="license">
</a>
<a href="https://pypi.python.org/pypi/nonebot-plugin-sparkapi">
<img src="https://img.shields.io/pypi/v/nonebot-plugin-multigpt.svg" alt="pypi">
</a>
<img src="https://img.shields.io/badge/python-3.8+-blue.svg" alt="python">
</div>
## 📖 介绍
基于Nonebot2平台,一个多模态AI聊天插件
能够识图,制作PPT,一键生成论文word文档,绘画,以及基本的对话功能
### 💬 功能
- [x] 支持AI对话
- [x] 支持上下文关联记忆(可设置记忆文本长度)
- [x] 用户鉴别(每个用户的历史记录独立)
- [x] 支持AI绘图(AI Image Generation)
- [x] 支持AI生成PPT(PPT Generation)
- [x] 支持AI生成word(word Generation)
### 📦 项目地址
- Github:https://github.com/syagina/nonebot-plugin-multigpt
- Pypi:https://pypi.org/project/nonebot-plugin-multigpt/
- Nonebot:https://registry.nonebot.dev/plugin/nonebot-plugin-multigpt:nonebot-plugin-multigpt
- 觉得好用的话,请给个 Star⭐️ 谢谢喵~
## 💿 安装
<details open>
<summary>使用 nb-cli 安装</summary>
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-multigpt
</details>
<details>
<summary>使用包管理器安装</summary>
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
<details>
<summary>pip</summary>
pip install nonebot-plugin-multigpt
</details>
<details>
<summary>pdm</summary>
pdm add nonebot-plugin-multigpt
</details>
<details>
<summary>poetry</summary>
poetry add nonebot-plugin-multigpt
</details>
<details>
<summary>conda</summary>
conda install nonebot-plugin-multigpt
</details>
打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入
plugins = ["nonebot_plugin_multigpt"]
</details>
## ⚙️ 指令列表
| 指令 | 需要@ | 范围 | 说明 |
|:-----:|:----:|:----:|:----:|
| chat | 否 | 私聊/群聊 | 与机器人进行对话 |
| chat文字+图片 | 否 | 私聊/群聊 | 根据内容对图片分析 |
| PPT | 否 | 私聊/群聊 | 制作PPT |
| 论文 | 否 | 私聊/群聊 | 输入要求一键生成论文docx文档 |
| 设置模型 | 否 | 私聊/群聊 | 切换gpt的模型 |
| 清空对话/刷新 | 否 | 私聊/群聊 | 清空历史记录 |
| 删除缓存 | 否 | 私聊/群聊 | 删除缓存文件 |
## ⚙️ 配置
在 nonebot2 项目的`.env`文件中添加下表中的必填配置(均为str类型)
| 配置项 | 必填 | 默认值 | 说明 |
|:-----:|:----:|:----:|:----:|
| OPENAI_API_KEY | 是 | "" | APIKey |
| OPENAI_API_BASE | 否 | "https://api.openai.com/v1/chat/completions" | 你的转发站地址 |
| MODEL | 否 | "" | 使用的模型 |
| GOOGLE_KEY | 否 | "" | "不填写不能使PPT附加图片" |
| COMMAND_MU | 否 | "chat" | 起始命令符参考nonebot的COMMAND_START |
| MULTI_PROXY | 否 | "" | 代理地址"http://127.0.0.1:你的端口" |
## ⚙️ 注意:
<details open>
你需要在data/nonebot-plugin-multigpt/theme文件夹下放置包含你的ppt模板的文件夹
例如:data/nonebot-plugin-multigpt/theme/红色风/示例.pptx
</details>
其中GOOGLE_KEY在[Serper](https://serper.dev/)注册密钥,每个人免费2500次搜索
![image](https://github.com/Yanyutin753/googleSearch-On-Wechat/assets/132346501/32a55333-1e5c-48fd-91fa-00f79cff04e5)
### 注意需要绘画时请切换绘画模型例如dalle-3(参考你的转发站或openai)
### 效果图
![demo](https://github.com/syagina/nonebot-plugin-multigpt/blob/main/Camera%20Roll/86BBB3B88A69B4C7C7130A7CFA68C25E.png)
![demo](https://github.com/syagina/nonebot-plugin-multigpt/blob/main/Camera%20Roll/E7294EC967D68DA403EC4AB5C00DB116.png)
![demo](https://github.com/syagina/nonebot-plugin-multigpt/blob/main/Camera%20Roll/E88CC601B4A6F79FC27CBC21328C21B3.png)
![demo](https://github.com/syagina/nonebot-plugin-multigpt/blob/main/Camera%20Roll/3226a38ad4d946b203b64be2b674d271.jpg)
## PPT制作代码
PPT制作代码改编于:[Python-PPTX-ChatGPT-Presentation-Generator](https://github.com/AmNotAGoose/Python-PPTX-ChatGPT-Presentation-Generator)
Raw data
{
"_id": null,
"home_page": null,
"name": "nonebot-plugin-multigpt",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python, GPT, ppt, word, docx, image, ai, multi",
"author": "syagina",
"author_email": "3173707804@qq.com",
"download_url": "https://files.pythonhosted.org/packages/e7/c2/dd7b4464d44872bb6fd6a417437c5d9b8de0954b61c9e54ebd6794ec857d/nonebot_plugin_multigpt-3.4.tar.gz",
"platform": null,
"description": "\r\n<div align=\"center\">\r\r\n <a href=\"https://v2.nonebot.dev/store\"><img src=\"https://source.cclmsy.cc/Images/nbp_Sparkapi/nbp_logo.png\" width=\"180\" height=\"180\" alt=\"NoneBotPluginLogo\"></a>\r\r\n <br>\r\r\n <p><img src=\"https://source.cclmsy.cc/Images/nbp_Sparkapi/NoneBotPlugin.svg\" width=\"240\" alt=\"NoneBotPluginText\"></p>\r\r\n</div>\r\r\n\r\r\n<div align=\"center\">\r\r\n\r\r\n# nonebot-plugin-multigpt\r\r\n\r\r\n_\u2728\u4e00\u4e2a\u591a\u6a21\u6001AI\u804a\u5929\u63d2\u4ef6\u2728_\r\r\n\r\r\n<a href=\"./LICENSE\">\r\r\n <img src=\"https://img.shields.io/github/license/syagina/nonebot-plugin-multigpt.svg\" alt=\"license\">\r\r\n</a>\r\r\n<a href=\"https://pypi.python.org/pypi/nonebot-plugin-sparkapi\">\r\r\n <img src=\"https://img.shields.io/pypi/v/nonebot-plugin-multigpt.svg\" alt=\"pypi\">\r\r\n</a>\r\r\n<img src=\"https://img.shields.io/badge/python-3.8+-blue.svg\" alt=\"python\">\r\r\n\r\r\n</div>\r\r\n\r\r\n## \ud83d\udcd6 \u4ecb\u7ecd\r\r\n\r\r\n\u57fa\u4e8eNonebot2\u5e73\u53f0\uff0c\u4e00\u4e2a\u591a\u6a21\u6001AI\u804a\u5929\u63d2\u4ef6\r\r\n\r\r\n\u80fd\u591f\u8bc6\u56fe\uff0c\u5236\u4f5cPPT\uff0c\u4e00\u952e\u751f\u6210\u8bba\u6587word\u6587\u6863\uff0c\u7ed8\u753b\uff0c\u4ee5\u53ca\u57fa\u672c\u7684\u5bf9\u8bdd\u529f\u80fd\r\r\n\r\r\n### \ud83d\udcac \u529f\u80fd\r\r\n- [x] \u652f\u6301AI\u5bf9\u8bdd\r\r\n- [x] \u652f\u6301\u4e0a\u4e0b\u6587\u5173\u8054\u8bb0\u5fc6\uff08\u53ef\u8bbe\u7f6e\u8bb0\u5fc6\u6587\u672c\u957f\u5ea6\uff09\r\r\n- [x] \u7528\u6237\u9274\u522b\uff08\u6bcf\u4e2a\u7528\u6237\u7684\u5386\u53f2\u8bb0\u5f55\u72ec\u7acb\uff09\r\r\n- [x] \u652f\u6301AI\u7ed8\u56fe\uff08AI Image Generation\uff09\r\r\n- [x] \u652f\u6301AI\u751f\u6210PPT\uff08PPT Generation\uff09\r\r\n- [x] \u652f\u6301AI\u751f\u6210word\uff08word Generation\uff09\r\r\n\r\r\n### \ud83d\udce6 \u9879\u76ee\u5730\u5740\r\r\n- Github\uff1ahttps://github.com/syagina/nonebot-plugin-multigpt\r\r\n- Pypi\uff1ahttps://pypi.org/project/nonebot-plugin-multigpt/\r\r\n- Nonebot\uff1ahttps://registry.nonebot.dev/plugin/nonebot-plugin-multigpt:nonebot-plugin-multigpt\r\r\n- \u89c9\u5f97\u597d\u7528\u7684\u8bdd\uff0c\u8bf7\u7ed9\u4e2a Star\u2b50\ufe0f \u8c22\u8c22\u55b5~ \r\r\n\r\r\n## \ud83d\udcbf \u5b89\u88c5\r\r\n\r\r\n<details open>\r\r\n<summary>\u4f7f\u7528 nb-cli \u5b89\u88c5</summary>\r\r\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\r\r\n\r\r\n nb plugin install nonebot-plugin-multigpt\r\r\n\r\r\n</details>\r\r\n\r\r\n<details>\r\r\n<summary>\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u5b89\u88c5</summary>\r\r\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\r\r\n\r\r\n<details>\r\r\n<summary>pip</summary>\r\r\n\r\r\n pip install nonebot-plugin-multigpt\r\r\n</details>\r\r\n<details>\r\r\n<summary>pdm</summary>\r\r\n\r\r\n pdm add nonebot-plugin-multigpt\r\r\n</details>\r\r\n<details>\r\r\n<summary>poetry</summary>\r\r\n\r\r\n poetry add nonebot-plugin-multigpt\r\r\n</details>\r\r\n<details>\r\r\n<summary>conda</summary>\r\r\n\r\r\n conda install nonebot-plugin-multigpt\r\r\n</details>\r\r\n\r\r\n\u6253\u5f00 nonebot2 \u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u7684 `pyproject.toml` \u6587\u4ef6, \u5728 `[tool.nonebot]` \u90e8\u5206\u8ffd\u52a0\u5199\u5165\r\r\n\r\r\n plugins = [\"nonebot_plugin_multigpt\"]\r\r\n\r\r\n</details>\r\r\n\r\r\n## \u2699\ufe0f \u6307\u4ee4\u5217\u8868\r\r\n\r\r\n\r\r\n| \u6307\u4ee4 | \u9700\u8981@ | \u8303\u56f4 | \u8bf4\u660e |\r\r\n|:-----:|:----:|:----:|:----:|\r\r\n| chat | \u5426 | \u79c1\u804a/\u7fa4\u804a | \u4e0e\u673a\u5668\u4eba\u8fdb\u884c\u5bf9\u8bdd |\r\r\n| chat\u6587\u5b57+\u56fe\u7247 | \u5426 | \u79c1\u804a/\u7fa4\u804a | \u6839\u636e\u5185\u5bb9\u5bf9\u56fe\u7247\u5206\u6790 |\r\r\n| PPT | \u5426 | \u79c1\u804a/\u7fa4\u804a | \u5236\u4f5cPPT |\r\r\n| \u8bba\u6587 | \u5426 | \u79c1\u804a/\u7fa4\u804a | \u8f93\u5165\u8981\u6c42\u4e00\u952e\u751f\u6210\u8bba\u6587docx\u6587\u6863 |\r\r\n| \u8bbe\u7f6e\u6a21\u578b | \u5426 | \u79c1\u804a/\u7fa4\u804a | \u5207\u6362gpt\u7684\u6a21\u578b |\r\r\n| \u6e05\u7a7a\u5bf9\u8bdd/\u5237\u65b0 | \u5426 | \u79c1\u804a/\u7fa4\u804a | \u6e05\u7a7a\u5386\u53f2\u8bb0\u5f55 |\r\r\n| \u5220\u9664\u7f13\u5b58 | \u5426 | \u79c1\u804a/\u7fa4\u804a | \u5220\u9664\u7f13\u5b58\u6587\u4ef6 |\r\r\n\r\r\n\r\r\n## \u2699\ufe0f \u914d\u7f6e\r\r\n\r\r\n\u5728 nonebot2 \u9879\u76ee\u7684`.env`\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4e0b\u8868\u4e2d\u7684\u5fc5\u586b\u914d\u7f6e(\u5747\u4e3astr\u7c7b\u578b)\r\r\n\r\r\n| \u914d\u7f6e\u9879 | \u5fc5\u586b | \u9ed8\u8ba4\u503c | \u8bf4\u660e |\r\r\n|:-----:|:----:|:----:|:----:|\r\r\n| OPENAI_API_KEY | \u662f | \"\" | APIKey |\r\r\n| OPENAI_API_BASE | \u5426 | \"https://api.openai.com/v1/chat/completions\" | \u4f60\u7684\u8f6c\u53d1\u7ad9\u5730\u5740 |\r\r\n| MODEL | \u5426 | \"\" | \u4f7f\u7528\u7684\u6a21\u578b |\r\r\n| GOOGLE_KEY | \u5426 | \"\" | \"\u4e0d\u586b\u5199\u4e0d\u80fd\u4f7fPPT\u9644\u52a0\u56fe\u7247\" | \r\r\n| COMMAND_MU | \u5426 | \"chat\" | \u8d77\u59cb\u547d\u4ee4\u7b26\u53c2\u8003nonebot\u7684COMMAND_START |\r\r\n| MULTI_PROXY | \u5426 | \"\" | \u4ee3\u7406\u5730\u5740\"http://127.0.0.1:\u4f60\u7684\u7aef\u53e3\" |\r\r\n\r\r\n\r\r\n## \u2699\ufe0f \u6ce8\u610f\uff1a\r\r\n<details open>\r\r\n\u4f60\u9700\u8981\u5728data/nonebot-plugin-multigpt/theme\u6587\u4ef6\u5939\u4e0b\u653e\u7f6e\u5305\u542b\u4f60\u7684ppt\u6a21\u677f\u7684\u6587\u4ef6\u5939\r\r\n\u4f8b\u5982\uff1adata/nonebot-plugin-multigpt/theme/\u7ea2\u8272\u98ce/\u793a\u4f8b.pptx\r\r\n</details>\r\r\n\r\r\n\u5176\u4e2dGOOGLE_KEY\u5728[Serper](https://serper.dev/)\u6ce8\u518c\u5bc6\u94a5\uff0c\u6bcf\u4e2a\u4eba\u514d\u8d392500\u6b21\u641c\u7d22\r\r\n![image](https://github.com/Yanyutin753/googleSearch-On-Wechat/assets/132346501/32a55333-1e5c-48fd-91fa-00f79cff04e5)\r\r\n\r\r\n\r\r\n\r\r\n### \u6ce8\u610f\u9700\u8981\u7ed8\u753b\u65f6\u8bf7\u5207\u6362\u7ed8\u753b\u6a21\u578b\u4f8b\u5982dalle-3(\u53c2\u8003\u4f60\u7684\u8f6c\u53d1\u7ad9\u6216openai)\r\r\n\r\r\n### \u6548\u679c\u56fe\r\r\n![demo](https://github.com/syagina/nonebot-plugin-multigpt/blob/main/Camera%20Roll/86BBB3B88A69B4C7C7130A7CFA68C25E.png)\r\r\n![demo](https://github.com/syagina/nonebot-plugin-multigpt/blob/main/Camera%20Roll/E7294EC967D68DA403EC4AB5C00DB116.png)\r\r\n![demo](https://github.com/syagina/nonebot-plugin-multigpt/blob/main/Camera%20Roll/E88CC601B4A6F79FC27CBC21328C21B3.png)\r\r\n![demo](https://github.com/syagina/nonebot-plugin-multigpt/blob/main/Camera%20Roll/3226a38ad4d946b203b64be2b674d271.jpg)\r\r\n\r\r\n## PPT\u5236\u4f5c\u4ee3\u7801\r\r\n\r\r\nPPT\u5236\u4f5c\u4ee3\u7801\u6539\u7f16\u4e8e\uff1a[Python-PPTX-ChatGPT-Presentation-Generator](https://github.com/AmNotAGoose/Python-PPTX-ChatGPT-Presentation-Generator)\r\r\n",
"bugtrack_url": null,
"license": null,
"summary": "a python package for multiGPT,\u591a\u6a21\u6001ai\u5de5\u5177",
"version": "3.4",
"project_urls": null,
"split_keywords": [
"python",
" gpt",
" ppt",
" word",
" docx",
" image",
" ai",
" multi"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e7c2dd7b4464d44872bb6fd6a417437c5d9b8de0954b61c9e54ebd6794ec857d",
"md5": "8863ade793f62d114eb00ba853c473b7",
"sha256": "804b14a43d4761e3fd155ffe7c9e1f43cd66a1ac10b7164a466b8bd53c6f4658"
},
"downloads": -1,
"filename": "nonebot_plugin_multigpt-3.4.tar.gz",
"has_sig": false,
"md5_digest": "8863ade793f62d114eb00ba853c473b7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19676,
"upload_time": "2024-06-16T06:40:07",
"upload_time_iso_8601": "2024-06-16T06:40:07.813378Z",
"url": "https://files.pythonhosted.org/packages/e7/c2/dd7b4464d44872bb6fd6a417437c5d9b8de0954b61c9e54ebd6794ec857d/nonebot_plugin_multigpt-3.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-16 06:40:07",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "nonebot-plugin-multigpt"
}