mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 17:02:11 +00:00
refactor(ai): Update OpenAI Completions provider to new content block API
This commit is contained in:
parent
7c8cdacc09
commit
a72e6d08d4
5 changed files with 209 additions and 86 deletions
|
|
@ -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 });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue