Преглед на файлове

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

hotfix for gemini invald argument #5715
Dogtiti преди 1 година
родител
ревизия
1110a087a0
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      app/client/platforms/google.ts

+ 4 - 1
app/client/platforms/google.ts

@@ -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