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-1.0.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 209bdd8260aa3f71259563f7fce15758b6d8aa76d686a79abb0d5d9a68674587 |
|
MD5 | 2a310094c8c8702775a7525b727a8a50 |
|
BLAKE2b-256 | 08f9b99e806c52105b68859c3358317aa1c5d62bac359fa4da081f4ed8740ee5 |
Close
Hashes for nonebot_plugin_gpt3-1.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c5003037609999b40ba977523642edbca3df98405c614450a8ce1addb9883bb |
|
MD5 | bac8bca104a03bd2cd20e54c334f0df9 |
|
BLAKE2b-256 | 7bfcbc1a72fe5d60e95eb00b0ce427bb48b27b4885d047c8e60b6a36d2b1228d |