You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes you might wish to keep the tool messages (:class:`Symfony\\AI\\Platform\\Message\\AssistantMessage` containing the ``toolCalls`` and :class:`Symfony\\AI\\Platform\\Message\\ToolCallMessage`
412
-
containing the result) in the context. Enable the ``keepToolMessages`` flag of the toolbox' :class:`Symfony\\AI\\Agent\\Toolbox\\AgentProcessor`
413
-
to ensure those messages will be added to your :class:`Symfony\\AI\\Platform\\Message\\MessageBag`::
411
+
Sometimes you might wish to exclude the tool messages (:class:`Symfony\\AI\\Platform\\Message\\AssistantMessage` containing the ``toolCalls`` and :class:`Symfony\\AI\\Platform\\Message\\ToolCallMessage`
412
+
containing the result) in the context. Enable the ``excludeToolMessages`` flag of the toolbox' :class:`Symfony\\AI\\Agent\\Toolbox\\AgentProcessor`
413
+
to ensure those messages will be removed from your :class:`Symfony\\AI\\Platform\\Message\\MessageBag`::
414
414
415
415
use Symfony\AI\Agent\Toolbox\AgentProcessor;
416
416
use Symfony\AI\Agent\Toolbox\Toolbox;
@@ -428,11 +428,11 @@ to ensure those messages will be added to your :class:`Symfony\\AI\\Platform\\Me
428
428
$tool = new MyTool();
429
429
430
430
$toolbox = new Toolbox([$tool]);
431
-
$toolProcessor = new AgentProcessor($toolbox, keepToolMessages: true);
431
+
$toolProcessor = new AgentProcessor($toolbox, excludeToolMessages: true);
432
432
433
433
$agent = new Agent($platform, $model, inputProcessor: [$toolProcessor], outputProcessor: [$toolProcessor]);
0 commit comments