Class TokenizerStream
java.lang.Object
smile.onnx.genai.TokenizerStream
- All Implemented Interfaces:
AutoCloseable
Incremental token → text decoder used while streaming generation.
-
Method Summary
-
Method Details
-
decode
Decodes one newly generated token into a text chunk (may be empty while multi-byte / multi-token pieces accumulate).The native buffer is owned by the stream until the next
decodecall orclose(); it must not be freed withOgaDestroyString.- Parameters:
token- token id.- Returns:
- decoded chunk; never
null.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-