Merge pull request #5720 from ConnectAI-E/hotfix/gemini_invald_argument

hotfix for gemini invald argument #5715
This commit is contained in:
Dogtiti 2024-10-25 18:25:46 +08:00 committed by GitHub
commit 1110a087a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -192,7 +192,10 @@ export class GeminiProApi implements LLMApi {
requestPayload,
getHeaders(),
// @ts-ignore
[{ functionDeclarations: tools.map((tool) => tool.function) }],
tools.length > 0
? // @ts-ignore
[{ functionDeclarations: tools.map((tool) => tool.function) }]
: [],
funcs,
controller,
// parseSSE