latestTokenUsage
Retrieves the latest token usage from the prompt within the LLM session.
Return
The latest token usage information as an integer.
fun latestTokenUsage(executorService: ERROR CLASS: Symbol not found for ExecutorService?? = null): Int(source)
Retrieves the most recent token usage count synchronously.
This method executes the latestTokenUsage function on the main dispatcher. It can leverage an optional ExecutorService to provide a custom thread management mechanism.
Return
The latest token usage count as an integer.
Parameters
executorService
An optional ExecutorService instance for managing thread execution. Defaults to null.