mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 05:47:11 +00:00
fix: 权限和角色问题导致的工具调用失败
This commit is contained in:
parent
0ac70a325f
commit
4dc5d6fe77
3 changed files with 13 additions and 4 deletions
|
|
@ -199,7 +199,12 @@ export class CustomGoogleGeminiClient extends GoogleGeminiClient {
|
|||
} else {
|
||||
// execute function
|
||||
try {
|
||||
functionResponse.response.content = await chosenTool.func(functionCall.args, this.e)
|
||||
let args = Object.assign(functionCall.args, {
|
||||
isAdmin: this.e.group.is_admin,
|
||||
isOwner: this.e.group.is_owner,
|
||||
sender: this.e.sender
|
||||
})
|
||||
functionResponse.response.content = await chosenTool.func(args, this.e)
|
||||
if (this.debug) {
|
||||
logger.info(JSON.stringify(functionResponse.response.content))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue