AI NVIDIA NeMo Guardrail Policy

Set custom failure messages

Configure the AI NVIDIA NeMo Guardrail policy to return custom messages when it blocks a request or a response. The policy returns request_failure_message when NeMo blocks a request, and response_failure_message when NeMo blocks a response.

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!