Partager via


ChatOptions.ContinuationToken Property

Definition

Gets or sets the continuation token for resuming and getting the result of the chat response identified by this token.

public:
 property Microsoft::Extensions::AI::ResponseContinuationToken ^ ContinuationToken { Microsoft::Extensions::AI::ResponseContinuationToken ^ get(); void set(Microsoft::Extensions::AI::ResponseContinuationToken ^ value); };
[System.Diagnostics.CodeAnalysis.Experimental("MEAI001")]
[System.Text.Json.Serialization.JsonIgnore]
public Microsoft.Extensions.AI.ResponseContinuationToken? ContinuationToken { get; set; }
[System.Text.Json.Serialization.JsonIgnore]
public Microsoft.Extensions.AI.ResponseContinuationToken? ContinuationToken { get; set; }
[<System.Diagnostics.CodeAnalysis.Experimental("MEAI001")>]
[<System.Text.Json.Serialization.JsonIgnore>]
member this.ContinuationToken : Microsoft.Extensions.AI.ResponseContinuationToken with get, set
[<System.Text.Json.Serialization.JsonIgnore>]
member this.ContinuationToken : Microsoft.Extensions.AI.ResponseContinuationToken with get, set
Public Property ContinuationToken As ResponseContinuationToken

Property Value

Attributes

Remarks

This property is used for background responses that can be activated via the AllowBackgroundResponses property if the IChatClient implementation supports them. Streamed background responses, such as those returned by default by GetStreamingResponseAsync(IEnumerable<ChatMessage>, ChatOptions, CancellationToken), can be resumed if interrupted. This means that a continuation token obtained from the ContinuationToken of an update just before the interruption occurred can be passed to this property to resume the stream from the point of interruption. Non-streamed background responses, such as those returned by GetResponseAsync(IEnumerable<ChatMessage>, ChatOptions, CancellationToken), can be polled for completion by obtaining the token from the ContinuationToken property and passing it to this property on subsequent calls to GetResponseAsync(IEnumerable<ChatMessage>, ChatOptions, CancellationToken).

Applies to