Skip to content

Commit a0404df

Browse files
committed
test split document
1 parent eb1214d commit a0404df

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/RAG/Splitters/DocumentSplitter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ public static function splitDocument(Document $document, int $maxLength = 1000,
2424
}
2525

2626
if (\strlen($text) <= $maxLength) {
27-
if (empty($document->hash)) $document->hash = \hash('sha256', $text);
27+
if (empty($document->hash)) {
28+
$document->hash = \hash('sha256', $text);
29+
}
2830
return [$document];
2931
}
3032

0 commit comments

Comments
 (0)