mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
fix: 啊
This commit is contained in:
parent
8c7e6489e7
commit
cd1687299a
3 changed files with 4 additions and 4 deletions
|
|
@ -2060,7 +2060,7 @@ export class chatgpt extends plugin {
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
args.groupId = e.group_id || e.sender.user_id
|
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}`)
|
logger.mark(`function ${name} execution result: ${functionResult}`)
|
||||||
option.parentMessageId = msg.id
|
option.parentMessageId = msg.id
|
||||||
option.name = name
|
option.name = name
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ export class ProcessPictureTool extends AbstractTool {
|
||||||
description: 'url of the picture'
|
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'
|
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}`
|
url = `https://q1.qlogo.cn/g?b=qq&s=160&nk=${qq}`
|
||||||
}
|
}
|
||||||
if (!url) {
|
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 imageResponse = await fetch(url)
|
||||||
const blob = await imageResponse.blob()
|
const blob = await imageResponse.blob()
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ export class SendPictureTool extends AbstractTool {
|
||||||
let { picture, groupId, qq } = opt
|
let { picture, groupId, qq } = opt
|
||||||
if (qq) {
|
if (qq) {
|
||||||
let avatar = `https://q1.qlogo.cn/g?b=qq&s=0&nk=${qq}`
|
let avatar = `https://q1.qlogo.cn/g?b=qq&s=0&nk=${qq}`
|
||||||
picture += ' ' + avatar
|
picture += (' ' + avatar)
|
||||||
}
|
}
|
||||||
let pictures = picture.trim().split(' ')
|
let pictures = picture.trim().split(' ')
|
||||||
pictures = pictures.map(img => segment.image(img))
|
pictures = pictures.map(img => segment.image(img))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue