mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 05:47:11 +00:00
fix: 修复前几天支持multiple tools导致的gemini搜了不发的问题
This commit is contained in:
parent
213818b635
commit
fcca28de37
2 changed files with 6 additions and 5 deletions
|
|
@ -222,11 +222,11 @@ export class CustomGoogleGeminiClient extends GoogleGeminiClient {
|
|||
|
||||
// ANY要笑死人的效果
|
||||
let mode = opt.toolMode || 'AUTO'
|
||||
let lastFuncName = opt.functionResponse?.name
|
||||
let lastFuncName = (/** @type {FunctionResponse[] | undefined}**/ opt.functionResponse)?.map(rsp => rsp.name)
|
||||
const mustSendNextTurn = [
|
||||
'searchImage', 'searchMusic', 'searchVideo'
|
||||
]
|
||||
if (lastFuncName && mustSendNextTurn.includes(lastFuncName)) {
|
||||
if (lastFuncName && lastFuncName?.find(name => mustSendNextTurn.includes(name))) {
|
||||
mode = 'ANY'
|
||||
}
|
||||
body.tool_config = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue