fix: 增加一些提示和一个暂时的公共接口

This commit is contained in:
ikechan8370 2023-06-25 00:37:24 +08:00
parent 2bf92e2bbf
commit a70b25987e
3 changed files with 9 additions and 4 deletions

View file

@ -1964,8 +1964,6 @@ export class chatgpt extends plugin {
new KickOutTool(), new KickOutTool(),
new WeatherTool(), new WeatherTool(),
new SendPictureTool(), new SendPictureTool(),
new ImageCaptionTool(),
serpTool serpTool
] ]
let img = [] let img = []
@ -1989,7 +1987,8 @@ export class chatgpt extends plugin {
if (e.img) { if (e.img) {
img.push(...e.img) img.push(...e.img)
} }
if (img.length > 0) { if (img.length > 0 && Config.extraUrl) {
tools.push(new ImageCaptionTool())
prompt += `\nthe url of the picture(s) above: ${img.join(', ')}` prompt += `\nthe url of the picture(s) above: ${img.join(', ')}`
} else { } else {
tools.push(new SerpImageTool()) tools.push(new SerpImageTool())

View file

@ -813,6 +813,12 @@ export function supportGuoba () {
] ]
} }
}, },
{
field: 'extraUrl',
label: '额外工具url',
bottomHelpMessage: '测试期间提供一个公益接口一段时间后撤掉参考搭建https://github.com/ikechan8370/chatgpt-plugin-extras',
component: 'Input'
}
], ],
// 获取配置数据方法(用于前端填充显示数据) // 获取配置数据方法(用于前端填充显示数据)
getConfigData () { getConfigData () {

View file

@ -128,7 +128,7 @@ const defaultConfig = {
amapKey: '', amapKey: '',
azSerpKey: '', azSerpKey: '',
serpSource: 'ikechan8370', serpSource: 'ikechan8370',
extraUrl: '', extraUrl: 'https://cpe.ikechan8370.com',
version: 'v2.7.0' version: 'v2.7.0'
} }
const _path = process.cwd() const _path = process.cwd()