Creates an instance of CopilotStudioClient.
The connection settings.
The authentication token.
StaticscopeReturns the scope URL needed to connect to Copilot Studio from the connection settings. This is used for authentication token audience configuration.
Copilot Studio connection settings.
The scope URL for token audience.
Sends a question to the Copilot Studio service and retrieves the response activities.
The question to ask.
OptionalconversationId: stringThe ID of the conversation. Defaults to the current conversation ID.
A promise yielding an array of activities.
Executes a turn in an existing conversation by sending an activity. This method provides explicit control over the conversation ID.
The activity to send.
The ID of the conversation. Required.
An async generator yielding the Agent's Activities.
Executes a turn and returns a typed response.
The activity to send.
The conversation ID.
A promise yielding an ExecuteTurnResponse with activities and metadata.
Sends an activity to the Copilot Studio service and retrieves the response activities.
The activity to send.
The ID of the conversation. Defaults to the current conversation ID.
A promise yielding an array of activities.
Sends an activity to the Copilot Studio service and retrieves the response activities.
The activity to send.
The ID of the conversation. Defaults to the current conversation ID.
An async generator yielding the Agent's Activities.
Starts a new conversation with the Copilot Studio service using a StartRequest.
The request parameters for starting the conversation.
A promise yielding an array of activities.
Starts a new conversation with the Copilot Studio service.
OptionalemitStartConversationEvent: booleanWhether to emit a start conversation event. Defaults to true.
A promise yielding an array of activities.
Starts a new conversation with the Copilot Studio service using a StartRequest.
The request parameters for starting the conversation.
An async generator yielding the Agent's Activities.
Starts a new conversation with the Copilot Studio service.
OptionalemitStartConversationEvent: booleanWhether to emit a start conversation event. Defaults to true.
An async generator yielding the Agent's Activities.
Starts a new conversation and returns a typed response.
Optionalrequest: boolean | StartRequestThe request parameters for starting the conversation.
A promise yielding a StartResponse with activities and conversation metadata.
Subscribes to a conversation to receive events via Server-Sent Events (SSE). This method allows resumption from a specific event ID.
The ID of the conversation to subscribe to.
OptionallastReceivedEventId: stringOptional. The last received event ID for resumption.
An async generator yielding SubscribeEvent objects containing activities and event IDs.
Client for interacting with Microsoft Copilot Studio services. Provides functionality to start conversations and send messages to Copilot Studio bots.