AI NVIDIA NeMo Guardrail Policy

Check requests and responses

Configure the AI NVIDIA NeMo Guardrail policy to check both requests and responses against NeMo Guardrails. Setting guarding_mode to BOTH runs the input rails on the request and the output rails on the response. Use a guardrail configuration that defines both an input rail and an output rail.

Prerequisites

  • A running NeMo Guardrails microservice that AI Gateway can reach.

  • An AI Model.

  • An OpenAI API key.

  • A stored NeMo guardrail configuration named content_safety_input_output that defines an input rail and an output rail.

Environment variables

  • OPENAI_API_KEY: The OpenAI API key that the NeMo Guardrails microservice uses to evaluate your rails.

Set up the policy

Attach the policy

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!