File tree Expand file tree Collapse file tree 2 files changed +0
-18
lines changed Expand file tree Collapse file tree 2 files changed +0
-18
lines changed Original file line number Diff line number Diff line change 1313
1414use Symfony \AI \Agent \AgentAwareInterface ;
1515use Symfony \AI \Agent \AgentAwareTrait ;
16- use Symfony \AI \Agent \Exception \MissingModelSupportException ;
1716use Symfony \AI \Agent \Input ;
1817use Symfony \AI \Agent \InputProcessorInterface ;
1918use Symfony \AI \Agent \Output ;
2019use Symfony \AI \Agent \OutputProcessorInterface ;
2120use Symfony \AI \Agent \Toolbox \Event \ToolCallsExecuted ;
2221use Symfony \AI \Agent \Toolbox \StreamResult as ToolboxStreamResponse ;
23- use Symfony \AI \Platform \Capability ;
2422use Symfony \AI \Platform \Message \AssistantMessage ;
2523use Symfony \AI \Platform \Message \Message ;
2624use Symfony \AI \Platform \Result \ResultInterface ;
@@ -46,10 +44,6 @@ public function __construct(
4644
4745 public function processInput (Input $ input ): void
4846 {
49- if (!$ input ->model ->supports (Capability::TOOL_CALLING )) {
50- throw MissingModelSupportException::forToolCalling ($ input ->model ::class);
51- }
52-
5347 $ toolMap = $ this ->toolbox ->getTools ();
5448 if ([] === $ toolMap ) {
5549 return ;
Original file line number Diff line number Diff line change 1313
1414use PHPUnit \Framework \TestCase ;
1515use Symfony \AI \Agent \AgentInterface ;
16- use Symfony \AI \Agent \Exception \MissingModelSupportException ;
1716use Symfony \AI \Agent \Input ;
1817use Symfony \AI \Agent \Output ;
1918use Symfony \AI \Agent \Toolbox \AgentProcessor ;
@@ -76,17 +75,6 @@ public function testProcessInputWithRegisteredToolsButToolOverride()
7675 $ this ->assertSame (['tools ' => [$ tool2 ]], $ input ->getOptions ());
7776 }
7877
79- public function testProcessInputWithUnsupportedToolCallingWillThrowException ()
80- {
81- $ this ->expectException (MissingModelSupportException::class);
82-
83- $ model = new Model ('gpt-3 ' );
84- $ processor = new AgentProcessor ($ this ->createStub (ToolboxInterface::class));
85- $ input = new Input ($ model , new MessageBag ());
86-
87- $ processor ->processInput ($ input );
88- }
89-
9078 public function testProcessOutputWithToolCallResponseKeepingMessages ()
9179 {
9280 $ toolbox = $ this ->createMock (ToolboxInterface::class);
You can’t perform that action at this time.
0 commit comments