Class NativeAPI.TokenUnions
public static class NativeAPI.TokenUnions
- Inheritance
-
objectNativeAPI.TokenUnions
Methods
litert_lm_token_unions_delete(nint)
Destroys a LiteRT LM Token Unions object.
public static extern void litert_lm_token_unions_delete(nint tokens)
Parameters
tokensnintThe token unions object to destroy.
litert_lm_token_unions_get_num_tokens(nint)
Returns the number of token unions in the collection.
public static extern nuint litert_lm_token_unions_get_num_tokens(nint tokens)
Parameters
tokensnintThe token unions object.
Returns
- nuint
The number of token unions.
litert_lm_token_unions_get_token_at(nint, nuint)
Returns the token union at a given index from a collection.
public static extern nint litert_lm_token_unions_get_token_at(nint tokens, nuint index)
Parameters
tokensnintThe token unions collection.
indexnuintThe index of the token union.
Returns
- nint
A pointer to the token union at the given index, or nint.Zero if the index is out of bounds. The caller is responsible for deleting the result using litert_lm_token_union_delete(nint).