Skip to content

Commit 7401354

Browse files
committed
Fix last PHPStan issue on mixed ask to vector
1 parent e4e3e5b commit 7401354

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

demo/src/Blog/Command/QueryCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ public function __invoke(SymfonyStyle $io): int
4545
$io->comment(\sprintf('Converting "%s" to vector & searching in Chroma DB ...', $search));
4646
$io->comment('Results are limited to 4 most similar documents.');
4747

48-
$vector = $this->vectorizer->vectorize($search);
48+
$vector = $this->vectorizer->vectorize((string) $search);
4949
$queryResponse = $collection->query(
50-
queryEmbeddings: [$vector->getData()], /* @phpstan-ignore-line until https://github.com/symfony/ai/issues/768 */
50+
queryEmbeddings: [$vector->getData()],
5151
nResults: 4,
5252
);
5353

0 commit comments

Comments
 (0)