Skip to content

Commit 5678ba3

Browse files
committed
extend data loader
1 parent 29b184f commit 5678ba3

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace NeuronAI\RAG\DataLoader;
4+
5+
abstract class AbstractDataLoader implements DataLoaderInterface
6+
{
7+
public static function for(...$args): static
8+
{
9+
return new static(...$args);
10+
}
11+
}

src/RAG/DataLoader/FileDataLoader.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ public function __construct(protected string $path, array $readers = [])
1717
$this->setReaders($readers);
1818
}
1919

20-
public static function file(...$args): static
21-
{
22-
return new static(...$args);
23-
}
24-
2520
public function addReader(string $fileExtension, ReaderInterface $reader): self
2621
{
2722
$this->readers[$fileExtension] = $reader;

0 commit comments

Comments
 (0)