Capture result.content

This commit is contained in:
Lukas Kreussel 2025-03-12 15:41:47 +01:00
parent 9d7510578b
commit 5c30eca851
No known key found for this signature in database
GPG key ID: BF47B4AE39D2C136

View file

@ -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)) {