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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 112ffae3d4bb072b7767e650b554a6879672a0f761bbce3dbb44bfd44b24c336 |
|
MD5 | c06c4f290a36e7fceb6206af46e989ff |
|
BLAKE2b-256 | b4b314faeb520286fd1f0de78e807cde4c2d7e8c8da57119cacec5e2ffa93b3e |
Close
Hashes for nonebot_plugin_gpt3-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61abc99f5fea26e9b713d441851de0c6ab4c44b3d090cb2ec4c4eb06a27407ac |
|
MD5 | b90de0bdd586bc1dca383bebf7123f5f |
|
BLAKE2b-256 | a89b55ed541f4aeff175974b8ed08debd190672bf2324caf188014a444544db4 |