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.
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.