ChatHistory Constructors

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Overloads

ChatHistory()

Initializes an empty history.

ChatHistory(IEnumerable<ChatMessageContent>)

Initializes the history will all of the specified messages.

ChatHistory(String)

Creates a new instance of the ChatHistory class with a system message

ChatHistory()

Initializes an empty history.

C#
public ChatHistory ();

Applies to

Semantic Kernel Dotnet Latest
Product Versions
Semantic Kernel Dotnet Latest

ChatHistory(IEnumerable<ChatMessageContent>)

Initializes the history will all of the specified messages.

C#
public ChatHistory (System.Collections.Generic.IEnumerable<Microsoft.SemanticKernel.ChatMessageContent> messages);

Parameters

messages
IEnumerable<ChatMessageContent>

The messages to copy into the history.

Exceptions

messages is null.

Applies to

Semantic Kernel Dotnet Latest
Product Versions
Semantic Kernel Dotnet Latest

ChatHistory(String)

Creates a new instance of the ChatHistory class with a system message

C#
public ChatHistory (string systemMessage);

Parameters

systemMessage
String

The system message to add to the history.

Applies to

Semantic Kernel Dotnet Latest
Product Versions
Semantic Kernel Dotnet Latest