ChatHistory.AddMessage Method
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
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
- contentItems
- ChatMessageContentItemCollection
- encoding
- Encoding
- metadata
- IReadOnlyDictionary<String,Object>
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
- metadata
- IReadOnlyDictionary<String,Object>