Skip to content

Commit 71465dc

Browse files
committed
minor #773 [Demo] Fix last PHPStan issue on mixed ask to vector (chr-hertel)
This PR was merged into the main branch. Discussion ---------- [Demo] Fix last PHPStan issue on mixed ask to vector | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Docs? | no | Issues | | License | MIT Fix #768 Commits ------- 7401354 Fix last PHPStan issue on mixed ask to vector
2 parents e4e3e5b + 7401354 commit 71465dc

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)