Skip to main content

Prompt Guard | C# SDK

Prompt Guard

PromptGuardClient

Prompt Guard API client.

var config = new Config("pangea_token", "pangea_domain");
var builder = new PromptGuardClient.Builder(config);
var client = builder.Build();

Guard (Beta)

PromptGuardClient.Guard(GuardRequest, CancellationToken)

Guard messages.

required parameters

GuardRequest

Request parameters.

CancellationToken

Cancellation token.

Response Object

Task<Response<GuardResult>>
var response = await client.Guard(new GuardRequest(
    new[] {
        new Message { Role = "user", Content = "how are you?" }
    }
));