No project description provided
Project description
功能
- 上下文功能
- 会话导出
- 返回文字图片渲染
- 每个人单独会话
- 人格设置
- 连续会话
如何使用?
私聊中是直接发送消息,群聊中是以回复的方式发送。
功能列表
指令 | 需要@ | 描述 |
---|---|---|
刷新/重置对话 | 是 | 重置会话记录,开始新的对话 |
重置人格 | 是 | 重置AI人格 |
设置人格 | 是 | 设置AI人格 |
导出会话/导出对话 | 是 | 导出历史会话 |
自定义的指令前缀 | 自定义是否需要@ | 基本的聊天对话 |
chat/聊天/开始聊天 | 是 | 开始连续对话 |
stop/结束/结束聊天 | 否 | 结束连续聊天模式 |
连续会话
输入chat/聊天/开始聊天即可不加前缀,连续的对话,输入结束/结束聊天,即可结束聊天
人格设置
预设了AI助手/猫娘/nsfw猫娘三种人格,可以通过人格设置切换。内置的设定可以从这里看到。
同样也可以手动指定人格
图片渲染
图片渲染可以在配置文件中配置是否,需要渲染
安装
- 使用 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 # 是否需要图片渲染
chatgpt_image_limit = 100 # 长度超过多少才会渲染成图片
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.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf7255f3264342a8df7c6236c764092fadeef538640339da7184f9fa7d1316fe |
|
MD5 | 9897ce9cdc4473e0c6463267524dbab5 |
|
BLAKE2b-256 | 53cf756a4d60f0a19bacd1505e05378728b0b3f8bd2809172df29fc6fd399877 |
Close
Hashes for nonebot_plugin_gpt3-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 685b686987d53da1eab73f6fb931177217a01fb061831b62bd2bdb0a2f90f8a6 |
|
MD5 | 634eb8b348d9d64f1a4a00630e537311 |
|
BLAKE2b-256 | e326817613601a68c1c00e1145866d263538d8ad206e057771f3c21eca4db7da |