CopilotClient Constructors

Definition

Overloads

Name Description
CopilotClient(ConnectionSettings, IHttpClientFactory, ILogger, String)

Creates a Direct-to-Engine client for Microsoft Copilot Studio hosted bots.

CopilotClient(ConnectionSettings, IHttpClientFactory, Func<String,Task<String>>, ILogger, String)

Creates a Direct-to-Engine client for Microsoft Copilot Studio hosted agents.

CopilotClient(ConnectionSettings, IHttpClientFactory, ILogger, String)

Creates a Direct-to-Engine client for Microsoft Copilot Studio hosted bots.

public CopilotClient(Microsoft.Agents.CopilotStudio.Client.ConnectionSettings settings, System.Net.Http.IHttpClientFactory httpClientFactory, Microsoft.Extensions.Logging.ILogger logger, string httpClientName = "mcs");
new Microsoft.Agents.CopilotStudio.Client.CopilotClient : Microsoft.Agents.CopilotStudio.Client.ConnectionSettings * System.Net.Http.IHttpClientFactory * Microsoft.Extensions.Logging.ILogger * string -> Microsoft.Agents.CopilotStudio.Client.CopilotClient
Public Sub New (settings As ConnectionSettings, httpClientFactory As IHttpClientFactory, logger As ILogger, Optional httpClientName As String = "mcs")

Parameters

settings
ConnectionSettings

The configuration settings for connecting to Copilot Studio.

httpClientFactory
IHttpClientFactory

The HTTP client factory to use when connecting to Copilot Studio.

logger
ILogger

The logger for Direct-to-Engine operations.

httpClientName
String

The name of the HTTP client to use from the factory.

Applies to

CopilotClient(ConnectionSettings, IHttpClientFactory, Func<String,Task<String>>, ILogger, String)

Creates a Direct-to-Engine client for Microsoft Copilot Studio hosted agents.

public CopilotClient(Microsoft.Agents.CopilotStudio.Client.ConnectionSettings settings, System.Net.Http.IHttpClientFactory httpClientFactory, Func<string,System.Threading.Tasks.Task<string>> tokenProviderFunction, Microsoft.Extensions.Logging.ILogger logger, string httpClientName);
new Microsoft.Agents.CopilotStudio.Client.CopilotClient : Microsoft.Agents.CopilotStudio.Client.ConnectionSettings * System.Net.Http.IHttpClientFactory * Func<string, System.Threading.Tasks.Task<string>> * Microsoft.Extensions.Logging.ILogger * string -> Microsoft.Agents.CopilotStudio.Client.CopilotClient
Public Sub New (settings As ConnectionSettings, httpClientFactory As IHttpClientFactory, tokenProviderFunction As Func(Of String, Task(Of String)), logger As ILogger, httpClientName As String)

Parameters

settings
ConnectionSettings

The configuration settings for connecting to Copilot Studio.

httpClientFactory
IHttpClientFactory

The HTTP client factory to use when connecting to Copilot Studio.

tokenProviderFunction
Func<String,Task<String>>

The function pointer for an async function that will accept a URL and return an access token.

logger
ILogger

The logger for Direct-to-Engine operations.

httpClientName
String

The name of the HTTP client to use from the factory.

Applies to