setMessageFilter
Sets the message filter used to determine which feature messages should be processed.
The provided filter function is invoked for each incoming feature message. If the filter function returns true, the message is deemed to meet the criteria for further processing.
Parameters
A lambda function that accepts a FeatureMessage and returns a boolean indicating whether the message should be processed (true) or ignored (false).
Example:
processor.setMessageFilter { message ->
message is LLMCallStartingEvent ||
message is LLMCallCompletedEvent
}Sets the message filter used to determine which feature messages should be processed.
The provided filter function is invoked for each incoming feature message. If the filter function returns true, the message is deemed to meet the criteria for further processing.
Parameters
A lambda function that accepts a FeatureMessage and returns a boolean indicating whether the message should be processed (true) or ignored (false).
Sets the message filter used to determine which feature messages should be processed.
The provided filter function is invoked for each incoming feature message. If the filter function returns true, the message is deemed to meet the criteria for further processing.
Parameters
A lambda function that accepts a FeatureMessage and returns a boolean indicating whether the message should be processed (true) or ignored (false).