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
chatppt 主题:XXXX,页数:XXXXX
- 删除当前用户缓存文件
删除缓存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.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c38d2dab7a87e4f424bccc25b30a7f9dfb8ffb57f0beff11b014d5cb5d238393 |
|
MD5 | 4c1c4610a1cdee3ca459d1b947ff4374 |
|
BLAKE2b-256 | ff0374a7bd08ea7ba04f46a286a033abc3a17a4a0769480f9c3a3e77a3ad64c3 |
Close
Hashes for nonebot_plugin_chatppt-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e228a278df2fbb6ba187ded450d77ed833cc8ce089c0bcb101a332d71490304 |
|
MD5 | 6cbb1ad7625bf3eff7a262298b58c1ff |
|
BLAKE2b-256 | 488fd584338e6a09882e7d9224b001b7236aa47645a64ffe5f0bf608c1735da7 |