debug(gemini): log raw API response on the server
This commit is contained in:
@@ -133,6 +133,11 @@ export async function callGeminiChat(opts: {
|
||||
config,
|
||||
});
|
||||
|
||||
console.log(
|
||||
"[GeminiChat] Raw Response:",
|
||||
JSON.stringify(response, null, 2),
|
||||
);
|
||||
|
||||
let text = "";
|
||||
let thoughts = "";
|
||||
const toolCalls: ToolCall[] = [];
|
||||
@@ -205,6 +210,8 @@ export async function* streamGeminiChat(opts: {
|
||||
config,
|
||||
});
|
||||
|
||||
console.log("[GeminiChat] Stream request initiated");
|
||||
|
||||
for await (const chunk of streamResult) {
|
||||
const parts = chunk.candidates?.[0]?.content?.parts ?? [];
|
||||
for (const part of parts) {
|
||||
|
||||
Reference in New Issue
Block a user