Constructor Message
- Namespace
- LMKit.TextGeneration.Chat
- Assembly
- LM-Kit.NET.dll
Message(AuthorRole, string)
Initializes a new instance of the ChatHistory.Message class with the specified author role and content.
public Message(AuthorRole authorRole, string content)Parameters
- authorRoleAuthorRole
- The role of the message's author, defined by AuthorRole. 
- contentstring
- The content of the message. Can be - null.
Message(AuthorRole, string, TextSegmentType)
Initializes a new ChatHistory.Message with an explicit initial segment type.
public Message(AuthorRole authorRole, string content, TextSegmentType segmentType)Parameters
- authorRoleAuthorRole
- contentstring
- The message text. Normalized to Unix line endings and trimmed; pass - nullto create an empty message.
- segmentTypeTextSegmentType
- The segment classification applied to the entire initial content, used for rendering and processing (e.g., UserVisible, ToolInvocation, ToolResponse). Avoid Undefined. 
Remarks
Seeds the internal segment map with a single segment starting at index 0 using segmentType.
Attachments, token counts, and termination state keep their defaults.