Interface IAzureAIContentSafetyClient
- Namespace
- FoundationaLLM.Common.Interfaces
- Assembly
- FoundationaLLM.Common.dll
Represents a client for interacting with Azure AI Content Safety services.
public interface IAzureAIContentSafetyClient
- Extension Methods
Methods
AnalyzeText(AnalyzeTextRequest, CancellationToken)
Analyzes the specified text and returns the results of the analysis.
Task<ClientResult<AnalyzeTextResult>> AnalyzeText(AnalyzeTextRequest request, CancellationToken cancellationToken = default)
Parameters
requestAnalyzeTextRequestThe request containing the text to analyze.
cancellationTokenCancellationTokenThe optional cancellation token used to signal a cancellation request.
Returns
- Task<ClientResult<AnalyzeTextResult>>
A task that represents the asynchronous operation. The task result contains an System.ClientModel.ClientResult object with the results of the analysis.
ShieldPrompt(ShieldPromptRequest, CancellationToken)
Analyzes a user prompt and associated documents for various prompt attacks.
Task<ClientResult<ShieldPromptResult>> ShieldPrompt(ShieldPromptRequest request, CancellationToken cancellationToken = default)
Parameters
requestShieldPromptRequestThe request containing the user prompt and associated documents.
cancellationTokenCancellationTokenThe optional cancellation token used to signal a cancellation request.
Returns
- Task<ClientResult<ShieldPromptResult>>
A task that represents the asynchronous operation. The task result contains an System.ClientModel.ClientResult object with the results of the analysis.