AI Guard | C# SDK
AI Guard
AIGuardClientAI Guard API client.
var config = new Config("pangea_token", "pangea_domain");
var builder = new AIGuardClient.Builder(config);
var client = builder.Build();
Text guard
AIGuardClient.GuardText(TextGuardRequest, CancellationToken)Analyze and redact text to avoid manipulation of the model, addition of malicious content, and other undesirable data transfers.
var response = await client.GuardText(new TextGuardRequest("hello world"));
Text guard
AIGuardClient.GuardText<TMessages>(MessagesGuardRequest<TMessages>, CancellationToken)Analyze and redact text to avoid manipulation of the model, addition of malicious content, and other undesirable data transfers.
var response = await client.GuardText(new MessagesGuardRequest <string, string>>>(new[]
{
new Dictionary<string, string> { { "role", "user" }, { "content", "what was pangea?" } }
}));