remove direct chnuk search. only vector search

This commit is contained in:
team 1
2026-02-18 14:46:55 +01:00
parent 12a5ab0bb3
commit ce03c65aca
6 changed files with 94 additions and 152 deletions

View File

@@ -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);