remove direct chnuk search. only vector search
This commit is contained in:
@@ -5,16 +5,22 @@ declare(strict_types=1);
|
||||
namespace App\Knowledge\Retrieval;
|
||||
|
||||
use Psr\Cache\CacheItemPoolInterface;
|
||||
use Psr\Cache\InvalidArgumentException;
|
||||
|
||||
final class CachedRetriever implements RetrieverInterface
|
||||
final readonly class CachedRetriever implements RetrieverInterface
|
||||
{
|
||||
public function __construct(
|
||||
private RetrieverInterface $inner,
|
||||
private RetrieverInterface $inner,
|
||||
private CacheItemPoolInterface $cache,
|
||||
private int $ttlSeconds = 600 // 10 Minuten
|
||||
) {}
|
||||
private int $ttlSeconds
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
public function retrieve(string $prompt, int $limit = 3): array
|
||||
/**
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public function retrieve(string $prompt, int $limit = 10): array
|
||||
{
|
||||
$key = $this->buildCacheKey($prompt, $limit);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user