A nonebot plugin for generating PPT slides from ChatGPT
Project description
nonebot-plugin-chatppt
介绍
- 本插件基于OpenAI的API开发,在nonebot框架下实现一个AI生成指定主题PPT的文件并上传到群文件中。
安装
-
手动安装
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
- 多模版支持
- 优化生成内容
- 完善插入图片功能
核心代码
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for nonebot_plugin_chatppt-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef3f705bb50c82a2b524b5241954037bc35204b41d134a4b25c217e945e7e522 |
|
MD5 | 6f945bf44f2ba53608a593f5b9ba2225 |
|
BLAKE2b-256 | 72d9b86e3c54a90d1f3527a5406501a72bb2e24acfd803ff2b4ab6530c30e814 |
Close
Hashes for nonebot_plugin_chatppt-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6034ce4fed91f7fbe3938cde798d6fda8d21f1ca9f083a2e4df85cfa43e95bf |
|
MD5 | 2d318159c9a45ce19c1d1f4a4b92cde5 |
|
BLAKE2b-256 | 71c05d9d4284b871ad71aaf85123097c5b79a42d5bafb4dbf8f05c2ce76c8bcd |