mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
* 修复引用转发,默认bing模式并发 * 开启stream增加稳定性 * fix: remove queue element only in non-bing mode * 使用chatgpt-api自带的超时逻辑,文字过多时启动切换到图片输出防止被吞 * Update chat.js * 添加Bing专用的图片输出样式 * 添加chatgpt的新图片模式,临时处理切换api导致的对话异常 * 修改bing样式表 * 为图片添加外部页面缓存 * 为图片模式添加MathJax * feat: add switch for qrcode * 防止script攻击 * 修复网页模板错误 * 修复bing页面引用错误 * 缓存服务器异常时处理 * 添加默认配置加载 * 修复配置文件路径错误 * 删除重复的模板文件,修复二维码地址错误 * 修正图片渲染错误 * 修复引用渲染错误 * 二维码网址统一改为使用本地配置 * 添加关闭思考提示的配置项 * 修复在Windows上无法载入配置文件的问题 * 修复关闭qr的情况下渲染错误 * 改为使用base64传递返回数据 * 当异常过多时使用图片输出 * 添加锅巴面板配置支持 * 补充遗漏的默认配置 * 修复qr模式下引用未被传递的问题 * 修复未将引用数据传输给缓存服务器的问题 * 删除无用的bingTimeoutMs配置项 * 添加消息队列超时弹出 * 优化图片模式处理,解决对话队列卡住的问题 * 添加对图片ocr的支持 * 添加图片识别配置项 * 添加黑名单配置项 * 修复一些bug * 修改锅巴配置格式和描述 * 传入数据也使用markdown * 图片识别换行改为marked兼容 * 添加绘图CD配置项 * 独立render模块,添加图片回复引用 --------- Co-authored-by: ikechan8370 <geyinchibuaa@gmail.com>
137 lines
4 KiB
JavaScript
137 lines
4 KiB
JavaScript
import plugin from '../../../lib/plugins/plugin.js'
|
||
import { Config } from '../utils/config.js'
|
||
import { render } from '../utils/common.js'
|
||
let version = Config.version
|
||
let helpData = [
|
||
{
|
||
group: '聊天',
|
||
list: [
|
||
{
|
||
icon: 'chat',
|
||
title: Config.toggleMode === 'at' ? '@我+聊天内容' : '#chat+聊天内容',
|
||
desc: '与机器人聊天'
|
||
},
|
||
{
|
||
icon: 'chat-private',
|
||
title: '私聊与我对话',
|
||
desc: '与机器人聊天'
|
||
},
|
||
{
|
||
icon: 'picture',
|
||
title: '#chatgpt图片模式',
|
||
desc: '机器人以图片形式回答'
|
||
},
|
||
{
|
||
icon: 'text',
|
||
title: '#chatgpt文本模式',
|
||
desc: '机器人以文本形式回答,默认选项'
|
||
},
|
||
{
|
||
icon: 'text',
|
||
title: '#chatgpt画图+prompt(/张数/图片大小)',
|
||
desc: '调用OpenAI Dalle API进行绘图,需要有API key并消耗余额。图片大小只能是256x256/512x512/1024x1024中的一个.默认为1张、512x512'
|
||
},
|
||
{
|
||
icon: 'text',
|
||
title: '#chatgpt改图',
|
||
desc: '调用OpenAI Dalle API进行改图,需要有API key并消耗余额。可同时发送图片或回复图片'
|
||
}
|
||
]
|
||
},
|
||
{
|
||
group: '管理',
|
||
list: [
|
||
{
|
||
icon: 'list',
|
||
title: '#chatgpt对话列表',
|
||
desc: '查询当前哪些人正在与机器人聊天.目前API3模式下支持切换对话'
|
||
},
|
||
{
|
||
icon: 'switch',
|
||
title: '#chatgpt切换对话+对话id',
|
||
desc: '目前仅API3模式下可用,切换到指定的对话中'
|
||
},
|
||
{
|
||
icon: 'switch',
|
||
title: '#chatgpt加入对话+@某人',
|
||
desc: '目前仅API3模式下可用,加入到某人当前进行的对话中'
|
||
},
|
||
{
|
||
icon: 'destroy',
|
||
title: '#chatgpt删除对话+对话id或@用户',
|
||
desc: '删除指定对话,并清空与用户的关联信息。@用户时支持多个用户'
|
||
},
|
||
{
|
||
icon: 'destroy',
|
||
title: '#结束对话',
|
||
desc: '结束自己当前对话,下次开启对话机器人将遗忘掉本次对话内容。'
|
||
},
|
||
{
|
||
icon: 'destroy-other',
|
||
title: '#结束对话 @某人',
|
||
desc: '结束该用户当前对话,下次开启对话机器人将遗忘掉本次对话内容。'
|
||
},
|
||
{
|
||
icon: 'queue',
|
||
title: '#清空chat队列',
|
||
desc: '清空当前对话等待队列。仅建议前方卡死时使用。'
|
||
},
|
||
{
|
||
icon: 'queue',
|
||
title: '#移出chat队列首位',
|
||
desc: '移出当前对话等待队列中的首位。若前方对话卡死可使用本命令。'
|
||
},
|
||
{
|
||
icon: 'confirm',
|
||
title: '#chatgpt开启/关闭问题确认',
|
||
desc: '开启或关闭机器人收到消息后的确认回复消息。'
|
||
},
|
||
{
|
||
icon: 'switch',
|
||
title: '#chatgpt切换浏览器/API/API2/API3/Bing',
|
||
desc: '切换使用的后端为浏览器或OpenAI API/第三方API/反代官网API/Bing'
|
||
},
|
||
{
|
||
icon: 'help',
|
||
title: '#chatgpt设置(必应)token',
|
||
desc: '设置ChatGPT或bing的Token'
|
||
},
|
||
{
|
||
icon: 'help',
|
||
title: '#OpenAI剩余额度',
|
||
desc: '查询OpenAI API剩余试用额度'
|
||
},
|
||
{
|
||
icon: 'help',
|
||
title: '#chatgpt模式帮助',
|
||
desc: '查看多种聊天模式的区别及当前使用的模式'
|
||
},
|
||
{
|
||
icon: 'help',
|
||
title: '#chatgpt帮助',
|
||
desc: '获取本帮助'
|
||
}
|
||
]
|
||
}
|
||
]
|
||
|
||
export class help extends plugin {
|
||
constructor (e) {
|
||
super({
|
||
name: 'ChatGPT-Plugin帮助',
|
||
dsc: 'ChatGPT-Plugin帮助',
|
||
event: 'message',
|
||
priority: 500,
|
||
rule: [
|
||
{
|
||
reg: '#(chatgpt|ChatGPT)(命令|帮助|菜单|help|说明|功能|指令|使用说明)',
|
||
fnc: 'help'
|
||
}
|
||
]
|
||
})
|
||
}
|
||
|
||
async help (e) {
|
||
await render(e, 'chatgpt-plugin', 'help/index', { helpData, version })
|
||
}
|
||
}
|