refactor(ai): Update OpenAI Completions provider to new content block API

This commit is contained in:
Mario Zechner 2025-08-31 20:59:57 +02:00
parent 7c8cdacc09
commit a72e6d08d4
5 changed files with 209 additions and 86 deletions

View file

@ -148,7 +148,11 @@ export class GoogleLLM implements LLM<GoogleLLMOptions> {
if (currentBlock.type === "thinking") {
currentBlock.thinking += part.text;
currentBlock.thinkingSignature = part.thoughtSignature;
options?.onEvent?.({type: "thinking_delta", content: currentBlock.thinking, delta: part.text });
options?.onEvent?.({
type: "thinking_delta",
content: currentBlock.thinking,
delta: part.text,
});
} else {
currentBlock.text += part.text;
options?.onEvent?.({ type: "text_delta", content: currentBlock.text, delta: part.text });