Property UserMessageCount
- Namespace
- LMKit.TextGeneration.Chat
- Assembly
- LM-Kit.NET.dll
UserMessageCount
Returns the number of user messages in the history.
public int UserMessageCount { get; }
Property Value
Examples
history.AddMessage(AuthorRole.System, "You are a helpful assistant.");
history.AddMessage(AuthorRole.User, "Hello");
history.AddMessage(AuthorRole.Assistant, "Hi!");
history.AddMessage(AuthorRole.User, "How are you?");
Console.WriteLine(history.UserMessageCount); // 2
Console.WriteLine(history.MessageCount); // 4