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 13
13
14
14
use Symfony \AI \Agent \AgentAwareInterface ;
15
15
use Symfony \AI \Agent \AgentAwareTrait ;
16
- use Symfony \AI \Agent \Exception \MissingModelSupportException ;
17
16
use Symfony \AI \Agent \Input ;
18
17
use Symfony \AI \Agent \InputProcessorInterface ;
19
18
use Symfony \AI \Agent \Output ;
20
19
use Symfony \AI \Agent \OutputProcessorInterface ;
21
20
use Symfony \AI \Agent \Toolbox \Event \ToolCallsExecuted ;
22
21
use Symfony \AI \Agent \Toolbox \StreamResult as ToolboxStreamResponse ;
23
- use Symfony \AI \Platform \Capability ;
24
22
use Symfony \AI \Platform \Message \AssistantMessage ;
25
23
use Symfony \AI \Platform \Message \Message ;
26
24
use Symfony \AI \Platform \Result \ResultInterface ;
@@ -46,10 +44,6 @@ public function __construct(
46
44
47
45
public function processInput (Input $ input ): void
48
46
{
49
- if (!$ input ->model ->supports (Capability::TOOL_CALLING )) {
50
- throw MissingModelSupportException::forToolCalling ($ input ->model ::class);
51
- }
52
-
53
47
$ toolMap = $ this ->toolbox ->getTools ();
54
48
if ([] === $ toolMap ) {
55
49
return ;
Original file line number Diff line number Diff line change 13
13
14
14
use PHPUnit \Framework \TestCase ;
15
15
use Symfony \AI \Agent \AgentInterface ;
16
- use Symfony \AI \Agent \Exception \MissingModelSupportException ;
17
16
use Symfony \AI \Agent \Input ;
18
17
use Symfony \AI \Agent \Output ;
19
18
use Symfony \AI \Agent \Toolbox \AgentProcessor ;
@@ -76,17 +75,6 @@ public function testProcessInputWithRegisteredToolsButToolOverride()
76
75
$ this ->assertSame (['tools ' => [$ tool2 ]], $ input ->getOptions ());
77
76
}
78
77
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
-
90
78
public function testProcessOutputWithToolCallResponseKeepingMessages ()
91
79
{
92
80
$ toolbox = $ this ->createMock (ToolboxInterface::class);
You can’t perform that action at this time.
0 commit comments