ChatMessageContent 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
ChatMessageContent() |
Creates a new instance of the ChatMessageContent class |
ChatMessageContent(AuthorRole, ChatMessageContentItemCollection, String, Object, Encoding, IReadOnlyDictionary<String,Object>) |
Creates a new instance of the ChatMessageContent class |
ChatMessageContent(AuthorRole, String, String, Object, Encoding, IReadOnlyDictionary<String,Object>) |
Creates a new instance of the ChatMessageContent class |
ChatMessageContent()
Creates a new instance of the ChatMessageContent class
[System.Text.Json.Serialization.JsonConstructor]
public ChatMessageContent ();
Public Sub New ()
- Attributes
Applies to
ChatMessageContent(AuthorRole, ChatMessageContentItemCollection, String, Object, Encoding, IReadOnlyDictionary<String,Object>)
Creates a new instance of the ChatMessageContent class
public ChatMessageContent (Microsoft.SemanticKernel.ChatCompletion.AuthorRole role, Microsoft.SemanticKernel.ChatCompletion.ChatMessageContentItemCollection items, string? modelId = default, object? innerContent = default, System.Text.Encoding? encoding = default, System.Collections.Generic.IReadOnlyDictionary<string,object?>? metadata = default);
new Microsoft.SemanticKernel.ChatMessageContent : Microsoft.SemanticKernel.ChatCompletion.AuthorRole * Microsoft.SemanticKernel.ChatCompletion.ChatMessageContentItemCollection * string * obj * System.Text.Encoding * System.Collections.Generic.IReadOnlyDictionary<string, obj> -> Microsoft.SemanticKernel.ChatMessageContent
Public Sub New (role As AuthorRole, items As ChatMessageContentItemCollection, Optional modelId As String = Nothing, Optional innerContent As Object = Nothing, Optional encoding As Encoding = Nothing, Optional metadata As IReadOnlyDictionary(Of String, Object) = Nothing)
Parameters
- role
- AuthorRole
Role of the author of the message
Instance of ChatMessageContentItemCollection with content items
- modelId
- String
The model ID used to generate the content
- innerContent
- Object
Inner content object reference
- encoding
- Encoding
Encoding of the text
- metadata
- IReadOnlyDictionary<String,Object>
Dictionary for any additional metadata
Applies to
ChatMessageContent(AuthorRole, String, String, Object, Encoding, IReadOnlyDictionary<String,Object>)
Creates a new instance of the ChatMessageContent class
public ChatMessageContent (Microsoft.SemanticKernel.ChatCompletion.AuthorRole role, string? content, string? modelId = default, object? innerContent = default, System.Text.Encoding? encoding = default, System.Collections.Generic.IReadOnlyDictionary<string,object?>? metadata = default);
new Microsoft.SemanticKernel.ChatMessageContent : Microsoft.SemanticKernel.ChatCompletion.AuthorRole * string * string * obj * System.Text.Encoding * System.Collections.Generic.IReadOnlyDictionary<string, obj> -> Microsoft.SemanticKernel.ChatMessageContent
Public Sub New (role As AuthorRole, content As String, Optional modelId As String = Nothing, Optional innerContent As Object = Nothing, Optional encoding As Encoding = Nothing, Optional metadata As IReadOnlyDictionary(Of String, Object) = Nothing)
Parameters
- role
- AuthorRole
Role of the author of the message
- content
- String
Content of the message
- modelId
- String
The model ID used to generate the content
- innerContent
- Object
Inner content object reference
- encoding
- Encoding
Encoding of the text
- metadata
- IReadOnlyDictionary<String,Object>
Dictionary for any additional metadata