AnonymousDelegatingChatClient.GetResponseSharedFunc Delegate

Definition

C#
public delegate System.Threading.Tasks.Task AnonymousDelegatingChatClient.GetResponseSharedFunc(IList<ChatMessage> chatMessages, ChatOptions? options, Func<IList<ChatMessage>,ChatOptions?,CancellationToken,Task> nextAsync, CancellationToken cancellationToken);

Parameters

chatMessages
IList<ChatMessage>

The chat content to send.

options
ChatOptions

The chat options to configure the request.

nextAsync
Func<IList<ChatMessage>,ChatOptions,CancellationToken,Task>

A delegate that provides the implementation for the inner client's GetResponseAsync(IList<ChatMessage>, ChatOptions, CancellationToken) or GetStreamingResponseAsync(IList<ChatMessage>, ChatOptions, CancellationToken). It should be invoked to continue the pipeline. It accepts the chat messages, options, and cancellation token, which are typically the same instances as provided to this method but need not be.

cancellationToken
CancellationToken

The CancellationToken to monitor for cancellation requests. The default is None.

Return Value

A Task that represents the completion of the operation.

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)