AI Guard | Node.js SDK
AI Guard
constructor(token: string, config: PangeaConfig): AIGuardServiceCreates a new AIGuardService
with the given Pangea API token and
configuration.
const config = new PangeaConfig({ domain: "pangea_domain" });
const aiGuard = new AIGuardService("pangea_token", config);
Text Guard for scanning LLM inputs and outputs
guardText(request: [object Object]): Promise<PangeaResponse<TextGuardResult<void>>>Analyze and redact text to avoid manipulation of the model, addition of malicious content, and other undesirable data transfers.
const response = await aiGuard.guardText({
text: "foobar",
});