This commit is contained in:
ikechan8370 2023-06-25 16:21:32 +08:00
parent 8c7e6489e7
commit cd1687299a
3 changed files with 4 additions and 4 deletions

View file

@ -2060,7 +2060,7 @@ export class chatgpt extends plugin {
} catch (err) {
args.groupId = e.group_id || e.sender.user_id
}
let functionResult = await fullFuncMap[name].exec(Object.assign({ isAdmin, sender }, ))
let functionResult = await fullFuncMap[name].exec(Object.assign({ isAdmin, sender }, args))
logger.mark(`function ${name} execution result: ${functionResult}`)
option.parentMessageId = msg.id
option.name = name

View file

@ -20,7 +20,7 @@ export class ProcessPictureTool extends AbstractTool {
description: 'url of the picture'
}
},
required: []
required: ['type']
}
description = 'useful when you want to know what is inside a photo, such as user\'s avatar or other pictures'
@ -31,7 +31,7 @@ export class ProcessPictureTool extends AbstractTool {
url = `https://q1.qlogo.cn/g?b=qq&s=160&nk=${qq}`
}
if (!url) {
return 'you must give at least one parameter of imgUrl and qq'
return 'you must give at least one parameter of url and qq'
}
const imageResponse = await fetch(url)
const blob = await imageResponse.blob()

View file

@ -25,7 +25,7 @@ export class SendPictureTool extends AbstractTool {
let { picture, groupId, qq } = opt
if (qq) {
let avatar = `https://q1.qlogo.cn/g?b=qq&s=0&nk=${qq}`
picture += ' ' + avatar
picture += (' ' + avatar)
}
let pictures = picture.trim().split(' ')
pictures = pictures.map(img => segment.image(img))