onMultipleAssistantMessages
inline fun AIAgentFunctionalContext.onMultipleAssistantMessages(response: List<Message.Response>, action: (List<Message.Assistant>) -> Unit)(source)
Filters the provided list of response messages to include only assistant messages and, if the filtered list is not empty, performs the specified action with the filtered list.
Parameters
response
A list of response messages to be processed. Only those of type Message.Assistant
will be considered.
action
A lambda function to execute on the list of assistant messages if the filtered list is not empty.