Language

OrchestratedClient.ExecuteTurnAsync Method

Definition

Executes an orchestrated turn with a custom request. This is the low-level method that all other methods delegate to.

public System.Collections.Generic.IAsyncEnumerable<Microsoft.Agents.CopilotStudio.Client.Models.OrchestratedResponse> ExecuteTurnAsync(string conversationId, Microsoft.Agents.CopilotStudio.Client.Models.OrchestratedTurnRequest request, Microsoft.Agents.CopilotStudio.Client.Models.RequestProperties? requestProperties = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ExecuteTurnAsync : string * Microsoft.Agents.CopilotStudio.Client.Models.OrchestratedTurnRequest * Microsoft.Agents.CopilotStudio.Client.Models.RequestProperties * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.Agents.CopilotStudio.Client.Models.OrchestratedResponse>
override this.ExecuteTurnAsync : string * Microsoft.Agents.CopilotStudio.Client.Models.OrchestratedTurnRequest * Microsoft.Agents.CopilotStudio.Client.Models.RequestProperties * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.Agents.CopilotStudio.Client.Models.OrchestratedResponse>
Public Function ExecuteTurnAsync (conversationId As String, request As OrchestratedTurnRequest, Optional requestProperties As RequestProperties = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of OrchestratedResponse)

Parameters

conversationId
String

The conversation ID.

request
OrchestratedTurnRequest

The orchestrated turn request to send.

requestProperties
RequestProperties

Optional properties mapped to HTTP request headers.

cancellationToken
CancellationToken

Cancellation token to cancel the operation.

Returns

An async enumerable stream of orchestrated responses from the copilot.

Implements

Applies to