Table of Contents

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

request AnalyzeTextRequest

The request containing the text to analyze.

cancellationToken CancellationToken

The 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

request ShieldPromptRequest

The request containing the user prompt and associated documents.

cancellationToken CancellationToken

The 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.