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
6 changes: 0 additions & 6 deletions src/agent/src/Toolbox/AgentProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@

use Symfony\AI\Agent\AgentAwareInterface;
use Symfony\AI\Agent\AgentAwareTrait;
use Symfony\AI\Agent\Exception\MissingModelSupportException;
use Symfony\AI\Agent\Input;
use Symfony\AI\Agent\InputProcessorInterface;
use Symfony\AI\Agent\Output;
use Symfony\AI\Agent\OutputProcessorInterface;
use Symfony\AI\Agent\Toolbox\Event\ToolCallsExecuted;
use Symfony\AI\Agent\Toolbox\StreamResult as ToolboxStreamResponse;
use Symfony\AI\Platform\Capability;
use Symfony\AI\Platform\Message\AssistantMessage;
use Symfony\AI\Platform\Message\Message;
use Symfony\AI\Platform\Result\ResultInterface;
Expand All @@ -46,10 +44,6 @@ public function __construct(

public function processInput(Input $input): void
{
if (!$input->model->supports(Capability::TOOL_CALLING)) {
throw MissingModelSupportException::forToolCalling($input->model::class);
}

$toolMap = $this->toolbox->getTools();
if ([] === $toolMap) {
return;
Expand Down
12 changes: 0 additions & 12 deletions src/agent/tests/Toolbox/AgentProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

use PHPUnit\Framework\TestCase;
use Symfony\AI\Agent\AgentInterface;
use Symfony\AI\Agent\Exception\MissingModelSupportException;
use Symfony\AI\Agent\Input;
use Symfony\AI\Agent\Output;
use Symfony\AI\Agent\Toolbox\AgentProcessor;
Expand Down Expand Up @@ -76,17 +75,6 @@ public function testProcessInputWithRegisteredToolsButToolOverride()
$this->assertSame(['tools' => [$tool2]], $input->getOptions());
}

public function testProcessInputWithUnsupportedToolCallingWillThrowException()
{
$this->expectException(MissingModelSupportException::class);

$model = new Model('gpt-3');
$processor = new AgentProcessor($this->createStub(ToolboxInterface::class));
$input = new Input($model, new MessageBag());

$processor->processInput($input);
}

public function testProcessOutputWithToolCallResponseKeepingMessages()
{
$toolbox = $this->createMock(ToolboxInterface::class);
Expand Down