Class AzureAIContentSafetyClient
- Namespace
 - FoundationaLLM.Common.Clients
 
- Assembly
 - FoundationaLLM.Common.dll
 
Provides methods for interacting with Azure AI Content Safety services.
public class AzureAIContentSafetyClient : IAzureAIContentSafetyClient
  - Inheritance
 - 
      
      AzureAIContentSafetyClient
 
- Implements
 
- Inherited Members
 
- Extension Methods
 
Constructors
AzureAIContentSafetyClient(Uri, AzureKeyCredential, APIEndpointClientOptions?)
Initializes a new instance of the AzureAIContentSafetyClient class.
public AzureAIContentSafetyClient(Uri endpoint, AzureKeyCredential credential, APIEndpointClientOptions? options)
  Parameters
endpointUriThe endpoint URI of the Azure AI Content Safety service.
credentialAzureKeyCredentialThe AzureKeyCredential used to authenticate requests to the service.
optionsAPIEndpointClientOptionsOptional configuration settings for the client, such as retry policies and timeouts.
Methods
AnalyzeText(AnalyzeTextRequest, CancellationToken)
public Task<ClientResult<AnalyzeTextResult>> AnalyzeText(AnalyzeTextRequest request, CancellationToken cancellationToken = default)
  Parameters
requestAnalyzeTextRequestcancellationTokenCancellationToken
Returns
- Task<ClientResult<AnalyzeTextResult>>
 
BuildClient(Dictionary<string, object>)
Creates and configures a new instance of the AzureAIContentSafetyClient.
public static IAzureAIContentSafetyClient BuildClient(Dictionary<string, object> clientBuilderParameters)
  Parameters
clientBuilderParametersDictionary<string, object>A dictionary of parameters used to further configure the client.
Returns
- IAzureAIContentSafetyClient
 A new instance of the AzureAIContentSafetyClient configured with the specified
clientBuilderParameters.
ShieldPrompt(ShieldPromptRequest, CancellationToken)
public Task<ClientResult<ShieldPromptResult>> ShieldPrompt(ShieldPromptRequest request, CancellationToken cancellationToken = default)
  Parameters
requestShieldPromptRequestcancellationTokenCancellationToken
Returns
- Task<ClientResult<ShieldPromptResult>>