次の方法で共有


StreamingChatMessageContent Class

Definition

Abstraction of chat message content chunks when using streaming from IChatCompletionService interface.

public class StreamingChatMessageContent : Microsoft.SemanticKernel.StreamingKernelContent
type StreamingChatMessageContent = class
    inherit StreamingKernelContent
Public Class StreamingChatMessageContent
Inherits StreamingKernelContent
Inheritance
StreamingChatMessageContent
Derived

Remarks

Represents a chat message content chunk that was streamed from the remote model.

Constructors

StreamingChatMessageContent(Nullable<AuthorRole>, String, Object, Int32, String, Encoding, IReadOnlyDictionary<String,Object>)

Initializes a new instance of the StreamingChatMessageContent class.

Properties

AuthorName

Name of the author of the message

ChoiceIndex

In a scenario of multiple choices per request, this represents zero-based index of the choice in the streaming sequence

(Inherited from StreamingKernelContent)
Content

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

Encoding

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

InnerContent

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

(Inherited from StreamingKernelContent)
Items

Chat message content items.

Metadata

The metadata associated with the content.

(Inherited from StreamingKernelContent)
ModelId

The model ID used to generate the content.

(Inherited from StreamingKernelContent)
Role

Role of the author of the message

Methods

ToByteArray()

Abstract byte[] representation of the chunk in a way it could be composed/appended with previous chunks.

ToString()

Abstract string representation of the chunk in a way it could compose/append with previous chunks.

Applies to