mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 12:03:23 +00:00
Fix block indexing in Google provider impl
This commit is contained in:
parent
2296dc4052
commit
9e86079386
1 changed files with 2 additions and 1 deletions
|
|
@ -99,12 +99,13 @@ export const streamGoogle: StreamFunction<"google-generative-ai"> = (
|
|||
}
|
||||
if (isThinking) {
|
||||
currentBlock = { type: "thinking", thinking: "", thinkingSignature: undefined };
|
||||
output.content.push(currentBlock);
|
||||
stream.push({ type: "thinking_start", contentIndex: blockIndex(), partial: output });
|
||||
} else {
|
||||
currentBlock = { type: "text", text: "" };
|
||||
output.content.push(currentBlock);
|
||||
stream.push({ type: "text_start", contentIndex: blockIndex(), partial: output });
|
||||
}
|
||||
output.content.push(currentBlock);
|
||||
}
|
||||
if (currentBlock.type === "thinking") {
|
||||
currentBlock.thinking += part.text;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue