getTokenCount method
Gets the number of tokens in the conversation KV Cache.
Implementation
Future<int> getTokenCount() {
final handle = _handle;
if (handle == null) {
throw const LiteRtLmException('Conversation is already disposed.');
}
return LiteRtLmNativeRuntime.instance.getTokenCount(handle);
}