onAssistantMessage

Creates an edge that filters assistant messages based on a custom condition and extracts their content.

Parameters

block

A function that evaluates whether to accept an assistant message