Skip to content

Commit 77bd851

Browse files
committed
rag data collect
1 parent 93ea8b5 commit 77bd851

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Events/VectorStoreResult.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class VectorStoreResult
1010
* @param array<Document> $documents
1111
*/
1212
public function __construct(
13+
public string $question,
1314
public array $documents,
1415
) {}
1516
}

src/RAG/RAG.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function answerQuestion(string $question, int $k = 4): Message
4242
$documents = $this->searchDocuments($question, $k);
4343
$this->notify(
4444
'rag:vectorstore:result',
45-
new VectorStoreResult($documents)
45+
new VectorStoreResult($question, $documents)
4646
);
4747

4848
$this->notify(

0 commit comments

Comments
 (0)