Name | nonebot-plugin-chatppt JSON |
Version |
0.1.1
JSON |
| download |
home_page | |
Summary | A nonebot plugin for generating PPT slides from ChatGPT |
upload_time | 2023-05-05 08:46:46 |
maintainer | |
docs_url | None |
author | Alpaca |
requires_python | >=3.8,<4.0 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<div align="center">
<a href="https://v2.nonebot.dev/store"><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.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-chatppt
</div>
## 介绍
- 本插件基于OpenAI的API开发,在nonebot框架下实现一个AI生成指定主题PPT的文件并上传到群文件中。
![](demo.png)
## 安装
* 手动安装
```
git clone https://github.com/Alpaca4610/nonebot-plugin-chatppt.git
```
下载完成后在bot项目的pyproject.toml文件手动添加插件:
```
plugin_dirs = ["xxxxxx","xxxxxx",......,"下载完成的插件路径/nonebot-plugin-chatppt"]
```
* 使用 pip
```
pip install nonebot-plugin-chatppt
```
## 配置文件
在Bot根目录下的.env文件中追加如下内容:
```
OPENAI_API_KEY = key
```
可选内容:
```
OPENAI_HTTP_PROXY = "http://127.0.0.1:8001" # 中国大陆/香港IP调用API请使用代理访问api,否则有几率会被封禁
OPENAI_MODEL_NAME = "xxxxx" # 使用的模型名称
SLIDES_LIMIT = "xxxxx" # 生成PPT页数的上限,不设置默认为10
```
## 使用方法
- 配置PPT模版文件
在Bot目录下的data文件夹里面新建nonebot-plugin-chatppt/theme文件夹。把PPT主题模版文件放进里面,支持多文件。
- 生成PPT命令
```
chatppt
```
- 删除当前用户缓存文件命令
```
删除缓存PPT
```
- 删除所有用户缓存文件命令
```
删除所有缓存PPT
```
## Todo
- [x] 多模版支持
- [ ] 优化生成内容
- [ ] 完善插入图片功能
## 核心代码
核心代码来源于:[Python-PPTX-ChatGPT-Presentation-Generator](https://github.com/AmNotAGoose/Python-PPTX-ChatGPT-Presentation-Generator)
Raw data
{
"_id": null,
"home_page": "",
"name": "nonebot-plugin-chatppt",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Alpaca",
"author_email": "alpaca@bupt.edu.cn",
"download_url": "https://files.pythonhosted.org/packages/da/bc/17af7f528cd9bddf56eb19409c6642837b61e20cf6fcc1ad26a4225e802a/nonebot_plugin_chatppt-0.1.1.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n <a href=\"https://v2.nonebot.dev/store\"><img src=\"https://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.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-chatppt\n</div>\n\n## \u4ecb\u7ecd\n- \u672c\u63d2\u4ef6\u57fa\u4e8eOpenAI\u7684API\u5f00\u53d1\uff0c\u5728nonebot\u6846\u67b6\u4e0b\u5b9e\u73b0\u4e00\u4e2aAI\u751f\u6210\u6307\u5b9a\u4e3b\u9898PPT\u7684\u6587\u4ef6\u5e76\u4e0a\u4f20\u5230\u7fa4\u6587\u4ef6\u4e2d\u3002\n\n![](demo.png)\n## \u5b89\u88c5\n\n* \u624b\u52a8\u5b89\u88c5\n ```\n git clone https://github.com/Alpaca4610/nonebot-plugin-chatppt.git\n ```\n\n \u4e0b\u8f7d\u5b8c\u6210\u540e\u5728bot\u9879\u76ee\u7684pyproject.toml\u6587\u4ef6\u624b\u52a8\u6dfb\u52a0\u63d2\u4ef6\uff1a\n\n ```\n plugin_dirs = [\"xxxxxx\",\"xxxxxx\",......,\"\u4e0b\u8f7d\u5b8c\u6210\u7684\u63d2\u4ef6\u8def\u5f84/nonebot-plugin-chatppt\"]\n ```\n* \u4f7f\u7528 pip\n ```\n pip install nonebot-plugin-chatppt\n ```\n\n## \u914d\u7f6e\u6587\u4ef6\n\n\u5728Bot\u6839\u76ee\u5f55\u4e0b\u7684.env\u6587\u4ef6\u4e2d\u8ffd\u52a0\u5982\u4e0b\u5185\u5bb9\uff1a\n\n```\nOPENAI_API_KEY = key\n```\n\n\u53ef\u9009\u5185\u5bb9\uff1a\n```\nOPENAI_HTTP_PROXY = \"http://127.0.0.1:8001\" # \u4e2d\u56fd\u5927\u9646/\u9999\u6e2fIP\u8c03\u7528API\u8bf7\u4f7f\u7528\u4ee3\u7406\u8bbf\u95eeapi,\u5426\u5219\u6709\u51e0\u7387\u4f1a\u88ab\u5c01\u7981\nOPENAI_MODEL_NAME = \"xxxxx\" # \u4f7f\u7528\u7684\u6a21\u578b\u540d\u79f0\nSLIDES_LIMIT = \"xxxxx\" # \u751f\u6210PPT\u9875\u6570\u7684\u4e0a\u9650\uff0c\u4e0d\u8bbe\u7f6e\u9ed8\u8ba4\u4e3a10\n```\n\n\n## \u4f7f\u7528\u65b9\u6cd5\n- \u914d\u7f6ePPT\u6a21\u7248\u6587\u4ef6\n\n \u5728Bot\u76ee\u5f55\u4e0b\u7684data\u6587\u4ef6\u5939\u91cc\u9762\u65b0\u5efanonebot-plugin-chatppt/theme\u6587\u4ef6\u5939\u3002\u628aPPT\u4e3b\u9898\u6a21\u7248\u6587\u4ef6\u653e\u8fdb\u91cc\u9762\uff0c\u652f\u6301\u591a\u6587\u4ef6\u3002\n\n- \u751f\u6210PPT\u547d\u4ee4\n```\nchatppt\n```\n- \u5220\u9664\u5f53\u524d\u7528\u6237\u7f13\u5b58\u6587\u4ef6\u547d\u4ee4\n```\n\u5220\u9664\u7f13\u5b58PPT\n```\n- \u5220\u9664\u6240\u6709\u7528\u6237\u7f13\u5b58\u6587\u4ef6\u547d\u4ee4\n```\n\u5220\u9664\u6240\u6709\u7f13\u5b58PPT\n```\n\n## Todo\n\n- [x] \u591a\u6a21\u7248\u652f\u6301\n- [ ] \u4f18\u5316\u751f\u6210\u5185\u5bb9\n- [ ] \u5b8c\u5584\u63d2\u5165\u56fe\u7247\u529f\u80fd\n\n## \u6838\u5fc3\u4ee3\u7801\n\n\u6838\u5fc3\u4ee3\u7801\u6765\u6e90\u4e8e\uff1a[Python-PPTX-ChatGPT-Presentation-Generator](https://github.com/AmNotAGoose/Python-PPTX-ChatGPT-Presentation-Generator)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A nonebot plugin for generating PPT slides from ChatGPT",
"version": "0.1.1",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1d19662aecdf764d8adcd1b30b653bd0817652f3b80d403f37510bc6204e8839",
"md5": "2802efd75d4993d2d0ed33163044cc9b",
"sha256": "23a4f139f34757bd115c4d5ab4332f3f7ceecb0b808618c652194fe1545a9d66"
},
"downloads": -1,
"filename": "nonebot_plugin_chatppt-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2802efd75d4993d2d0ed33163044cc9b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 6831,
"upload_time": "2023-05-05T08:45:56",
"upload_time_iso_8601": "2023-05-05T08:45:56.162272Z",
"url": "https://files.pythonhosted.org/packages/1d/19/662aecdf764d8adcd1b30b653bd0817652f3b80d403f37510bc6204e8839/nonebot_plugin_chatppt-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dabc17af7f528cd9bddf56eb19409c6642837b61e20cf6fcc1ad26a4225e802a",
"md5": "fa3e092076a477c7e1c4ae0891594913",
"sha256": "146daeab762524ea3b3d59da63cf9eeee4d728da626f7d5c3cf1095d46a1fdab"
},
"downloads": -1,
"filename": "nonebot_plugin_chatppt-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "fa3e092076a477c7e1c4ae0891594913",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 6489,
"upload_time": "2023-05-05T08:46:46",
"upload_time_iso_8601": "2023-05-05T08:46:46.030856Z",
"url": "https://files.pythonhosted.org/packages/da/bc/17af7f528cd9bddf56eb19409c6642837b61e20cf6fcc1ad26a4225e802a/nonebot_plugin_chatppt-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-05 08:46:46",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "nonebot-plugin-chatppt"
}