Skip to content

Commit 75c8e45

Browse files
committed
fix streaming in RAG
1 parent ca5357f commit 75c8e45

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/RAG/RAG.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ public function stream(Message|array $messages): \Generator
6767
$this->retrieveDocuments($question)
6868
);
6969

70-
yield from parent::stream($messages);
70+
$response = yield from parent::stream($messages);
7171

7272
$this->notify('stream-rag-stop');
73+
74+
return $response;
7375
}
7476

7577
public function structured(Message|array $messages, ?string $class = null, int $maxRetries = 1): mixed

0 commit comments

Comments
 (0)