fix: bug fix

This commit is contained in:
ikechan8370 2023-12-10 23:16:40 +08:00
parent 699d2c8d27
commit d254163fa7

View file

@ -2323,7 +2323,7 @@ export class chatgpt extends plugin {
}
}
let img = await getImg(e)
if (img.length > 0 && Config.extraUrl) {
if (img?.length > 0 && Config.extraUrl) {
tools.push(new ImageCaptionTool())
tools.push(new ProcessPictureTool())
prompt += `\nthe url of the picture(s) above: ${img.join(', ')}`