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
authorRoleAuthorRoleThe role of the message's author, defined by AuthorRole.
contentstringThe 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
authorRoleAuthorRolecontentstringThe message text. Normalized to Unix line endings and trimmed; pass
nullto create an empty message.segmentTypeTextSegmentTypeThe 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.