ContentSafetyServiceConfiguration Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| ContentSafetyServiceConfiguration(TokenCredential, String, HttpClient, Int32) |
Initializes a new instance of the ContentSafetyServiceConfiguration class for a non-Hub-based
Azure AI Foundry project with the specified |
| ContentSafetyServiceConfiguration(TokenCredential, Uri, HttpClient, Int32) |
Initializes a new instance of the ContentSafetyServiceConfiguration class for a non-Hub-based
Azure AI Foundry project with the specified |
| ContentSafetyServiceConfiguration(TokenCredential, String, String, String, HttpClient, Int32) |
Initializes a new instance of the ContentSafetyServiceConfiguration class for a Hub-based Azure
AI Foundry project with the specified |
ContentSafetyServiceConfiguration(TokenCredential, String, HttpClient, Int32)
Initializes a new instance of the ContentSafetyServiceConfiguration class for a non-Hub-based
Azure AI Foundry project with the specified endpointUrl.
public ContentSafetyServiceConfiguration(Azure.Core.TokenCredential credential, string endpointUrl, System.Net.Http.HttpClient? httpClient = default, int timeoutInSecondsForRetries = 300);
new Microsoft.Extensions.AI.Evaluation.Safety.ContentSafetyServiceConfiguration : Azure.Core.TokenCredential * string * System.Net.Http.HttpClient * int -> Microsoft.Extensions.AI.Evaluation.Safety.ContentSafetyServiceConfiguration
Public Sub New (credential As TokenCredential, endpointUrl As String, Optional httpClient As HttpClient = Nothing, Optional timeoutInSecondsForRetries As Integer = 300)
Parameters
- credential
- TokenCredential
The Azure TokenCredential that should be used when authenticating requests.
- endpointUrl
- String
The endpoint URL for the non-Hub-based Azure AI Foundry project.
- httpClient
- HttpClient
The HttpClient that should be used when communicating with the Azure AI Foundry Evaluation service. While the parameter is optional, it is recommended to supply an HttpClient that is configured with robust resilience and retry policies.
- timeoutInSecondsForRetries
- Int32
The timeout (in seconds) after which a ContentSafetyEvaluator should stop retrying failed attempts to communicate with the Azure AI Foundry Evaluation service when performing evaluations.
Remarks
Azure AI Foundry supports two kinds of projects - Hub-based projects and non-Hub-based projects (also known simply as Foundry projects). See Create a project for Azure AI Foundry.
Use this constructor overload if you are working with a non-Hub-based project.
Applies to
ContentSafetyServiceConfiguration(TokenCredential, Uri, HttpClient, Int32)
Initializes a new instance of the ContentSafetyServiceConfiguration class for a non-Hub-based
Azure AI Foundry project with the specified endpoint.
public ContentSafetyServiceConfiguration(Azure.Core.TokenCredential credential, Uri endpoint, System.Net.Http.HttpClient? httpClient = default, int timeoutInSecondsForRetries = 300);
new Microsoft.Extensions.AI.Evaluation.Safety.ContentSafetyServiceConfiguration : Azure.Core.TokenCredential * Uri * System.Net.Http.HttpClient * int -> Microsoft.Extensions.AI.Evaluation.Safety.ContentSafetyServiceConfiguration
Public Sub New (credential As TokenCredential, endpoint As Uri, Optional httpClient As HttpClient = Nothing, Optional timeoutInSecondsForRetries As Integer = 300)
Parameters
- credential
- TokenCredential
The Azure TokenCredential that should be used when authenticating requests.
- endpoint
- Uri
The endpoint for the non-Hub-based Azure AI Foundry project.
- httpClient
- HttpClient
The HttpClient that should be used when communicating with the Azure AI Foundry Evaluation service. While the parameter is optional, it is recommended to supply an HttpClient that is configured with robust resilience and retry policies.
- timeoutInSecondsForRetries
- Int32
The timeout (in seconds) after which a ContentSafetyEvaluator should stop retrying failed attempts to communicate with the Azure AI Foundry Evaluation service when performing evaluations.
Remarks
Azure AI Foundry supports two kinds of projects - Hub-based projects and non-Hub-based projects (also known simply as Foundry projects). See Create a project for Azure AI Foundry.
Use this constructor overload if you are working with a non-Hub-based project.
Applies to
ContentSafetyServiceConfiguration(TokenCredential, String, String, String, HttpClient, Int32)
Initializes a new instance of the ContentSafetyServiceConfiguration class for a Hub-based Azure
AI Foundry project with the specified projectName.
public ContentSafetyServiceConfiguration(Azure.Core.TokenCredential credential, string subscriptionId, string resourceGroupName, string projectName, System.Net.Http.HttpClient? httpClient = default, int timeoutInSecondsForRetries = 300);
new Microsoft.Extensions.AI.Evaluation.Safety.ContentSafetyServiceConfiguration : Azure.Core.TokenCredential * string * string * string * System.Net.Http.HttpClient * int -> Microsoft.Extensions.AI.Evaluation.Safety.ContentSafetyServiceConfiguration
Public Sub New (credential As TokenCredential, subscriptionId As String, resourceGroupName As String, projectName As String, Optional httpClient As HttpClient = Nothing, Optional timeoutInSecondsForRetries As Integer = 300)
Parameters
- credential
- TokenCredential
The Azure TokenCredential that should be used when authenticating requests.
- subscriptionId
- String
The ID of the Azure subscription that contains the Hub-based AI Foundry project identified by
projectName.
- resourceGroupName
- String
The name of the Azure resource group that contains the Hub-based AI Foundry project identified by
projectName.
- projectName
- String
The name of the Hub-based Azure AI Foundry project.
- httpClient
- HttpClient
The HttpClient that should be used when communicating with the Azure AI Foundry Evaluation service. While the parameter is optional, it is recommended to supply an HttpClient that is configured with robust resilience and retry policies.
- timeoutInSecondsForRetries
- Int32
The timeout (in seconds) after which a ContentSafetyEvaluator should stop retrying failed attempts to communicate with the Azure AI Foundry Evaluation service when performing evaluations.
Remarks
Azure AI Foundry supports two kinds of projects - Hub-based projects and non-Hub-based projects (also known simply as Foundry projects). See Create a project for Azure AI Foundry.
Use this constructor overload if you are working with a Hub-based project.