Partager via


ChatHistory Constructors

Definition

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.

public ChatHistory ();
Public Sub New ()

Applies to

ChatHistory(IEnumerable<ChatMessageContent>)

Initializes the history will all of the specified messages.

public ChatHistory (System.Collections.Generic.IEnumerable<Microsoft.SemanticKernel.ChatMessageContent> messages);
new Microsoft.SemanticKernel.ChatCompletion.ChatHistory : seq<Microsoft.SemanticKernel.ChatMessageContent> -> Microsoft.SemanticKernel.ChatCompletion.ChatHistory
Public Sub New (messages As IEnumerable(Of ChatMessageContent))

Parameters

messages
IEnumerable<ChatMessageContent>

The messages to copy into the history.

Exceptions

messages is null.

Applies to

ChatHistory(String)

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

public ChatHistory (string systemMessage);
new Microsoft.SemanticKernel.ChatCompletion.ChatHistory : string -> Microsoft.SemanticKernel.ChatCompletion.ChatHistory
Public Sub New (systemMessage As String)

Parameters

systemMessage
String

The system message to add to the history.

Applies to