DataSource

interface DataSource(source)

Represents a source of user interaction data from the application. The application implements this to feed data to the KarlContainer. This interface resides in the data package as it's specific to providing data.

Functions

Link copied to clipboard
abstract fun observeInteractionData(onNewData: suspend (InteractionData) -> Unit, coroutineScope: <Error class: unknown class>): <Error class: unknown class>

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.