Table of Contents

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

authorRole AuthorRole

The role of the message's author, defined by AuthorRole.

content string

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

authorRole AuthorRole

The role of the author (e.g., User, Assistant).

content string

The message text. Normalized to Unix line endings and trimmed; pass null to create an empty message.

segmentType TextSegmentType

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.