Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/store/src/Document/Loader/InMemoryLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@
use Symfony\AI\Store\Document\TextDocument;

/**
* Loader that returns pre-loaded TextDocuments from memory.
* Useful for testing or when documents are already available as objects.
*
* @author Oskar Stark <oskarstark@googlemail.com>
*/
final readonly class InMemoryLoader implements LoaderInterface
{
/**
* @param array<TextDocument> $documents
* @param TextDocument[] $documents
*/
public function __construct(
private array $documents = [],
Expand Down