Why was it a warning level

776d2203746d8568f845c483371c9021e6fb573b

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

1 files changed, +2 -2Showing whitespace changes
src/endpoints/backends/chat-completions.js+2 -2
@@ -1,7 +1,7 @@
1import process from 'node:process';1import process from 'node:process';
2import util from 'node:util';
2import express from 'express';3import express from 'express';
3import fetch from 'node-fetch';4import fetch from 'node-fetch';
4import util from 'node:util';
55
6import {6import {
7 CHAT_COMPLETION_SOURCES,7 CHAT_COMPLETION_SOURCES,
@@ -499,7 +499,7 @@ async function sendMakerSuiteRequest(request, response) {
499 const responseContent = candidates[0].content ?? candidates[0].output;499 const responseContent = candidates[0].content ?? candidates[0].output;
500 const functionCall = (candidates?.[0]?.content?.parts ?? []).some(part => part.functionCall);500 const functionCall = (candidates?.[0]?.content?.parts ?? []).some(part => part.functionCall);
501 const inlineData = (candidates?.[0]?.content?.parts ?? []).some(part => part.inlineData);501 const inlineData = (candidates?.[0]?.content?.parts ?? []).some(part => part.inlineData);
502 console.warn('Google AI Studio response:', util.inspect(generateResponseJson, { depth: 5, colors: true }));502 console.debug('Google AI Studio response:', util.inspect(generateResponseJson, { depth: 5, colors: true }));
503503
504 const responseText = typeof responseContent === 'string' ? responseContent : responseContent?.parts?.filter(part => !part.thought)?.map(part => part.text)?.join('\n\n');504 const responseText = typeof responseContent === 'string' ? responseContent : responseContent?.parts?.filter(part => !part.thought)?.map(part => part.text)?.join('\n\n');
505 if (!responseText && !functionCall && !inlineData) {505 if (!responseText && !functionCall && !inlineData) {