Partager via


ChatHistory.AddMessage Method

Definition

Overloads

AddMessage(AuthorRole, ChatMessageContentItemCollection, Encoding, IReadOnlyDictionary<String,Object>)
AddMessage(AuthorRole, String, Encoding, IReadOnlyDictionary<String,Object>)

AddMessage(AuthorRole, ChatMessageContentItemCollection, Encoding, IReadOnlyDictionary<String,Object>)

public void AddMessage (Microsoft.SemanticKernel.ChatCompletion.AuthorRole authorRole, Microsoft.SemanticKernel.ChatCompletion.ChatMessageContentItemCollection contentItems, System.Text.Encoding? encoding = default, System.Collections.Generic.IReadOnlyDictionary<string,object?>? metadata = default);
member this.AddMessage : Microsoft.SemanticKernel.ChatCompletion.AuthorRole * Microsoft.SemanticKernel.ChatCompletion.ChatMessageContentItemCollection * System.Text.Encoding * System.Collections.Generic.IReadOnlyDictionary<string, obj> -> unit
Public Sub AddMessage (authorRole As AuthorRole, contentItems As ChatMessageContentItemCollection, Optional encoding As Encoding = Nothing, Optional metadata As IReadOnlyDictionary(Of String, Object) = Nothing)

Parameters

authorRole
AuthorRole
encoding
Encoding

Applies to

AddMessage(AuthorRole, String, Encoding, IReadOnlyDictionary<String,Object>)

public void AddMessage (Microsoft.SemanticKernel.ChatCompletion.AuthorRole authorRole, string content, System.Text.Encoding? encoding = default, System.Collections.Generic.IReadOnlyDictionary<string,object?>? metadata = default);
member this.AddMessage : Microsoft.SemanticKernel.ChatCompletion.AuthorRole * string * System.Text.Encoding * System.Collections.Generic.IReadOnlyDictionary<string, obj> -> unit
Public Sub AddMessage (authorRole As AuthorRole, content As String, Optional encoding As Encoding = Nothing, Optional metadata As IReadOnlyDictionary(Of String, Object) = Nothing)

Parameters

authorRole
AuthorRole
content
String
encoding
Encoding

Applies to