Enum AuthorRole
- Namespace
- LMKit.TextGeneration.Chat
- Assembly
- LM-Kit.NET.dll
Specifies the role of the message author within a chat history. Roles help the runtime and model distinguish system instructions, user prompts, model responses, tool I/O, and other non-dialogual segments.
public enum AuthorRole
Fields
Undefined = 0
An undefined role. Intended for internal use only; should not be used in application code.
System = 1
A system message that sets the assistant's behavior and context. Not authored by the user or the assistant.
User = 2
A message authored by the user.
Assistant = 3
A message generated by the assistant (language model).
TextRun = 4
A plain text segment inserted into the chat history without any associated author or special formatting. Useful for stitching additional context (e.g., memory recall notes) into the transcript.
BeginOfNewConversation = 5
An empty message indicating the start of a new conversation. Primarily used when building training datasets stored with a
ChatHistory
object.Tool = 6
A message produced by an external tool in response to a model-initiated tool call.
The content typically contains the tool's structured result (often JSON), which the assistant will then consume to produce a follow-up Assistant message. This role represents tool output (not the request); the request is usually encoded in the preceding Assistant turn as a tool-call directive.
Tool messages are not authored by the user or the assistant and should not be treated as natural-language turns. They may be injected programmatically by the runtime when handling tool-calling flows.