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

hotfix for gemini invald argument #5715

lloydzhou преди 1 година
родител
ревизия
f89872b833
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      app/client/platforms/google.ts

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

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