Skip to content
Merged
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 src/agent/tests/AgentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function testConstructorThrowsExceptionForInvalidInputProcessor()
$invalidProcessor = new \stdClass();

$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('Processor "stdClass" must implement "Symfony\AI\Agent\InputProcessorInterface".');
$this->expectExceptionMessage('Processor "stdClass" must implement "'.InputProcessorInterface::class.'".');

/* @phpstan-ignore-next-line */
new Agent($platform, $model, [$invalidProcessor]);
Expand All @@ -117,7 +117,7 @@ public function testConstructorThrowsExceptionForInvalidOutputProcessor()
$invalidProcessor = new \stdClass();

$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('Processor "stdClass" must implement "Symfony\AI\Agent\OutputProcessorInterface".');
$this->expectExceptionMessage('Processor "stdClass" must implement "'.OutputProcessorInterface::class.'".');

/* @phpstan-ignore-next-line */
new Agent($platform, $model, [], [$invalidProcessor]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use Symfony\AI\Platform\Bridge\OpenAi\Embeddings;
use Symfony\AI\Platform\Bridge\OpenAi\Gpt;
use Symfony\AI\Platform\Message\MessageBag;
use Symfony\AI\Platform\Model;

#[CoversClass(ModelOverrideInputProcessor::class)]
#[UsesClass(Gpt::class)]
Expand Down Expand Up @@ -58,7 +59,7 @@ public function testProcessInputWithoutModelOption()
public function testProcessInputWithInvalidModelOption()
{
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('Option "model" must be an instance of "Symfony\AI\Platform\Model".');
$this->expectExceptionMessage('Option "model" must be an instance of "'.Model::class.'".');

$gpt = new Gpt();
$model = new MessageBag();
Expand Down
2 changes: 1 addition & 1 deletion src/agent/tests/Toolbox/ToolboxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function testExecuteWithUnknownTool()
public function testExecuteWithMisconfiguredTool()
{
$this->expectException(ToolConfigurationException::class);
$this->expectExceptionMessage('Method "foo" not found in tool "Symfony\AI\Fixtures\Tool\ToolMisconfigured".');
$this->expectExceptionMessage('Method "foo" not found in tool "'.ToolMisconfigured::class.'".');

$toolbox = new Toolbox([new ToolMisconfigured()], new ReflectionToolFactory());

Expand Down