Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions demo/src/Audio/Chat.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Symfony\AI\Platform\Message\Message;
use Symfony\AI\Platform\Message\MessageBag;
use Symfony\AI\Platform\PlatformInterface;
use Symfony\AI\Platform\Result\TextResult;
use Symfony\AI\Platform\Response\TextResponse;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
use Symfony\Component\HttpFoundation\RequestStack;

Expand Down Expand Up @@ -56,7 +56,7 @@ public function submitMessage(string $message): void
$messages->add(Message::ofUser($message));
$result = $this->agent->call($messages);

\assert($result instanceof TextResult);
\assert($result instanceof TextResponse);

$messages->add(Message::ofAssistant($result->getContent()));

Expand Down
4 changes: 2 additions & 2 deletions demo/src/Blog/Chat.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Symfony\AI\Agent\AgentInterface;
use Symfony\AI\Platform\Message\Message;
use Symfony\AI\Platform\Message\MessageBag;
use Symfony\AI\Platform\Result\TextResult;
use Symfony\AI\Platform\Response\TextResponse;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
use Symfony\Component\HttpFoundation\RequestStack;

Expand Down Expand Up @@ -51,7 +51,7 @@ public function submitMessage(string $message): void
$messages->add(Message::ofUser($message));
$result = $this->agent->call($messages);

\assert($result instanceof TextResult);
\assert($result instanceof TextResponse);

$messages->add(Message::ofAssistant($result->getContent()));

Expand Down
2 changes: 1 addition & 1 deletion demo/src/Blog/Command/QueryCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$io->comment(\sprintf('Converting "%s" to vector & searching in Chroma DB ...', $search));
$io->comment('Results are limited to 4 most similar documents.');

$platformResponse = $this->platform->invoke(new Embeddings(), $search);
$platformResponse = $this->platform->request(new Embeddings(), $search);
$queryResponse = $collection->query(
queryEmbeddings: [$platformResponse->asVectors()[0]->getData()],
nResults: 4,
Expand Down
4 changes: 2 additions & 2 deletions demo/src/Wikipedia/Chat.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Symfony\AI\Agent\AgentInterface;
use Symfony\AI\Platform\Message\Message;
use Symfony\AI\Platform\Message\MessageBag;
use Symfony\AI\Platform\Result\TextResult;
use Symfony\AI\Platform\Response\TextResponse;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
use Symfony\Component\HttpFoundation\RequestStack;

Expand All @@ -41,7 +41,7 @@ public function submitMessage(string $message): void
$messages->add(Message::ofUser($message));
$result = $this->agent->call($messages);

\assert($result instanceof TextResult);
\assert($result instanceof TextResponse);

$messages->add(Message::ofAssistant($result->getContent()));

Expand Down
4 changes: 2 additions & 2 deletions demo/src/YouTube/Chat.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Symfony\AI\Agent\AgentInterface;
use Symfony\AI\Platform\Message\Message;
use Symfony\AI\Platform\Message\MessageBag;
use Symfony\AI\Platform\Result\TextResult;
use Symfony\AI\Platform\Response\TextResponse;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
use Symfony\Component\HttpFoundation\RequestStack;

Expand Down Expand Up @@ -63,7 +63,7 @@ public function submitMessage(string $message): void
$messages->add(Message::ofUser($message));
$result = $this->agent->call($messages);

\assert($result instanceof TextResult);
\assert($result instanceof TextResponse);

$messages->add(Message::ofAssistant($result->getContent()));

Expand Down