Freigeben über


ChatMessageContent Class

Definition

Represents chat message content return from a IChatCompletionService service.

public class ChatMessageContent : Microsoft.SemanticKernel.KernelContent
type ChatMessageContent = class
    inherit KernelContent
Public Class ChatMessageContent
Inherits KernelContent
Inheritance
ChatMessageContent
Derived

Constructors

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

Properties

AuthorName

Name of the author of the message

Content

A convenience property to get or set the text of the first item in the Items collection of TextContent type.

Encoding

The encoding of the text content.

InnerContent

The inner content representation. Use this to bypass the current abstraction.

(Inherited from KernelContent)
Items

Chat message content items

Metadata

The metadata associated with the content.

(Inherited from KernelContent)
MimeType

MIME type of the content.

(Inherited from KernelContent)
ModelId

The model ID used to generate the content.

(Inherited from KernelContent)
Role

Role of the author of the message

Source

Represents the source of the message.

Methods

ToString()

Returns a string that represents the current object.

Applies to