Table of Contents

Method ToTokens

Namespace
LMKit.TextGeneration.Chat
Assembly
LM-Kit.NET.dll

ToTokens()

Returns the complete history in the form of model tokens.

public int[] ToTokens()

Returns

int[]

An array of integers where each entry represents a token identifier.

Examples

int[] tokens = history.ToTokens();
Console.WriteLine($"Total tokens: {tokens.Length}");
Share