Skip to content

Commit 3bdead5

Browse files
committed
optimize retrieval
1 parent 70a44b6 commit 3bdead5

File tree

3 files changed

+1
-20
lines changed

3 files changed

+1
-20
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"scripts-descriptions": {
6262
"analyse": "Run PHPStan static analysis against your application.",
6363
"format": "Run PHP CS Fixer against your application.",
64+
"refactor": "Run rector for code refactoring.",
6465
"test": "Run PHPUnit to test"
6566
},
6667
"autoload": {

src/RAG/Retrieval/RetrievalInterface.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,4 @@ interface RetrievalInterface
1515
* @return Document[]
1616
*/
1717
public function retrieve(Message $query): array;
18-
19-
/**
20-
* Set configuration parameters for the retrieval strategy.
21-
*
22-
* @param array<string, mixed> $config
23-
*/
24-
public function setConfiguration(array $config): RetrievalInterface;
2518
}

src/RAG/Retrieval/SimilarityRetrieval.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,9 @@
1010

1111
class SimilarityRetrieval implements RetrievalInterface
1212
{
13-
/**
14-
* @param array<string, mixed> $config
15-
*/
1613
public function __construct(
1714
private readonly VectorStoreInterface $vectorStore,
1815
private readonly EmbeddingsProviderInterface $embeddingProvider,
19-
private array $config = []
2016
) {
2117
}
2218

@@ -26,13 +22,4 @@ public function retrieve(Message $query): array
2622
$this->embeddingProvider->embedText($query->getContent())
2723
);
2824
}
29-
30-
/**
31-
* @param array<string, mixed> $config
32-
*/
33-
public function setConfiguration(array $config): RetrievalInterface
34-
{
35-
$this->config = \array_merge($this->config, $config);
36-
return $this;
37-
}
3825
}

0 commit comments

Comments
 (0)