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 = "." # 触发聊天的前缀
chatgpt_need_at = False # 是否需要@
chatgpt_image_render = True # 是否需要图片渲染
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.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25ccea9d91479f57e73edc24d26b3f4ad8436411ad6950fb3d85831be3f2b8ca |
|
MD5 | 8e933faa4784a0cb87f5c02e3b23e245 |
|
BLAKE2b-256 | b5d3cfb61c11359c211b883b26977b22541bf42862972ee272469d08494010ea |
Close
Hashes for nonebot_plugin_gpt3-1.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f72a8f20344fcd4e03632a8440db9530ebb8aaeb534c0b7add3fb736767d611d |
|
MD5 | 1b5c31fc051dd9a6b9f5cbd7b4a06ee0 |
|
BLAKE2b-256 | 3e5417bc245a2e3b0f375b74be5ae25a6fd9411b15e1841ac6d116c535281146 |