No project description provided
Project description
功能
- 上下文
- 会话导出
- 返回文字图片渲染
- 每个人单独会话
- 更多配置
安装
- 使用 nb-cli
nb plugin install nonebot_plugin_gpt3
- 通过包管理器安装,可以通过nb,pip3,或者poetry等方式安装,以pip为例
pip install nonebot_plugin_gpt3
随后在bot.py
中加上如下代码,加载插件
nonebot.load_plugin('nonebot_plugin_gpt3')
配置
对于官方openai接口只需配置API Keys即可,所以请填写API在您配置的chatgpt_token_path
下面,默认路径是config/chatgpt_img_config.yml
文件内格式如下,有多个Key请按照如下格式配置。
api_keys:
- XXX
- YYY
之后是一些自定义配置,根据注释可以自行修改,如果需要配置请在env.dev
下进行配置。
chatgpt_api_key_path = "config/chatgpt_api.yml" # api文件
chatgpt_command_prefix = "chat" # 触发聊天的前缀
chatgpt_need_at = False # 是否需要@
chatgpt_image_render = False # 是否需要图片渲染
如何使用?
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_gpt3-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a100c26432e6a34f4bc77392c1b6991f3baeb0fdbd3cb876bfb63b70aac697b |
|
MD5 | 001cae8fd4b8318ae2472e30775186bb |
|
BLAKE2b-256 | 33d9b1ba379f1c346905e9d2634d05bb0882ebebf9b60b1dc3d32b86095f6ae0 |
Close
Hashes for nonebot_plugin_gpt3-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7d1269b6cb61543e75eb2be9efc812125628cf6226984f5cf1fe0856455a40d |
|
MD5 | 05bd175c1a41c65814bf57a107eccecb |
|
BLAKE2b-256 | e3696f31ba3c616c1b53b95636b558115dfe5fab899d5bbed5fc9a9f2b7c649a |