File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -76,19 +76,24 @@ public function processInput(Input $input): void
7676
7777 public function processOutput (Output $ output ): void
7878 {
79- if ($ output ->getResult () instanceof GenericStreamResponse) {
79+ $ result = $ output ->getResult ();
80+
81+ if ($ result instanceof GenericStreamResponse) {
8082 $ output ->setResult (
81- new ToolboxStreamResponse ($ output ->getResult ()->getContent (), $ this ->handleToolCallsCallback ($ output ))
83+ new ToolboxStreamResponse (
84+ $ result ,
85+ $ this ->handleToolCallsCallback ($ output )
86+ )
8287 );
8388
8489 return ;
8590 }
8691
87- if (!$ output -> getResult () instanceof ToolCallResult) {
92+ if (!$ result instanceof ToolCallResult) {
8893 return ;
8994 }
9095
91- $ output ->setResult ($ this ->handleToolCallsCallback ($ output )($ output -> getResult () ));
96+ $ output ->setResult ($ this ->handleToolCallsCallback ($ output )($ result ));
9297 }
9398
9499 /**
You can’t perform that action at this time.
0 commit comments