predict
abstract suspend fun predict(contextData: List<InteractionData> = emptyList(), instructions: List<KarlInstruction> = emptyList()): Prediction?(source)
Makes a prediction or suggestion based on the current learned state and optional context.
This method should be designed to be fast and efficient for on-device execution, as it might be called frequently from the application's UI thread (within a coroutine).
Return
A Prediction object if a confident suggestion can be made, or null otherwise.
Parameters
contextData
Optional list of recent InteractionData to provide context for the prediction.
instructions
A list of user-defined KarlInstructions that can modify the prediction behavior (e.g., setting a confidence threshold).