IChatCopilot.GetResponseAsync

GetResponseAsync(string, CancellationToken?)

Asynchronously gets a response for the given message.

public Task<string> GetResponseAsync(string message, CancellationToken? cancellationToken = default)
ParameterTypeDescription
messageStringThe input message for which a response is requested.
cancellationTokenNullable`1The cancellation token (optional).

Return Value

A task representing the asynchronous operation with the response string.

See Also


GetResponseAsync(List<string>, CancellationToken?)

Asynchronously gets a response for the given list of messages.

public Task<string> GetResponseAsync(List<string> messages, 
    CancellationToken? cancellationToken = default)
ParameterTypeDescription
messagesList`1The list of input messages for which responses are requested.
cancellationTokenNullable`1The cancellation token (optional).

Return Value

A task representing the asynchronous operation with the response string.

See Also