mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-18 06:17:06 +00:00
fix: 增加一些提示和一个暂时的公共接口
This commit is contained in:
parent
2bf92e2bbf
commit
a70b25987e
3 changed files with 9 additions and 4 deletions
|
|
@ -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())
|
||||||
|
|
|
||||||
|
|
@ -813,6 +813,12 @@ export function supportGuoba () {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'extraUrl',
|
||||||
|
label: '额外工具url',
|
||||||
|
bottomHelpMessage: '(测试期间提供一个公益接口,一段时间后撤掉)参考搭建:https://github.com/ikechan8370/chatgpt-plugin-extras',
|
||||||
|
component: 'Input'
|
||||||
|
}
|
||||||
],
|
],
|
||||||
// 获取配置数据方法(用于前端填充显示数据)
|
// 获取配置数据方法(用于前端填充显示数据)
|
||||||
getConfigData () {
|
getConfigData () {
|
||||||
|
|
|
||||||
|
|
@ -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()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue