Merge pull request #3914 from cloak1505/google-patch Print full Google response

cb32fb354c8c0022f0255b8c3f386d19f1935d55

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
1 files changed, +2 -1Showing whitespace changes
src/endpoints/backends/chat-completions.js+2 -1
@@ -1,4 +1,5 @@
11import process from 'node:process';
2+import util from 'node:util';
23import express from 'express';
34import fetch from 'node-fetch';
45
@@ -498,7 +499,7 @@ async function sendMakerSuiteRequest(request, response) {
498499 const responseContent = candidates[0].content ?? candidates[0].output;
499500 const functionCall = (candidates?.[0]?.content?.parts ?? []).some(part => part.functionCall);
500501 const inlineData = (candidates?.[0]?.content?.parts ?? []).some(part => part.inlineData);
501502 console.warndebug('Google AI Studio response:', responseContentutil.inspect(generateResponseJson, { depth: 5, colors: true }));
502503
503504 const responseText = typeof responseContent === 'string' ? responseContent : responseContent?.parts?.filter(part => !part.thought)?.map(part => part.text)?.join('\n\n');
504505 if (!responseText && !functionCall && !inlineData) {