onFinishStream

fun onFinishStream(handler: suspend (String) -> Unit)(source)

Registers a handler that is triggered when the stream processing is finished.

Parameters

handler

The function to handle the final output, receiving the remaining text as a parameter.