diff --git a/core/llm/index.ts b/core/llm/index.ts index 64e13c51d..21048d5f8 100644 --- a/core/llm/index.ts +++ b/core/llm/index.ts @@ -821,6 +821,7 @@ export abstract class BaseLLM implements ILLM { for await (const chunk of stream) { const result = fromChatCompletionChunk(chunk); if (result) { + completion += result.content; yield result; } if (!citations && (chunk as any).citations && Array.isArray((chunk as any).citations)) {