observeInteractionData
abstract fun observeInteractionData(onNewData: suspend (InteractionData) -> Unit, coroutineScope: <Error class: unknown class>): <Error class: unknown class>(source)
Should be implemented by the application to provide a stream of relevant InteractionData events to the KarlContainer. This function might start observation and return a Job that can be cancelled. The implementation should call the provided onNewData callback whenever a new interaction occurs that KARL should potentially learn from.
Return
A Job representing the running observation task. Cancelling this job stops the data stream.
Parameters
onNewData
A callback function provided by KarlContainer to receive new InteractionData.
coroutineScope
A CoroutineScope for launching observation tasks.