onAssistantMessage
inline fun AIAgentFunctionalContext.onAssistantMessage(response: Message.Response, action: (Message.Assistant) -> Unit)(source)
Executes the provided action if the given response is of type Message.Assistant.
Parameters
response
The response message to evaluate, which may or may not be of type Message.Assistant.
action
A lambda function to execute if the response is an instance of Message.Assistant.