Using the NeMo Guardrails Library Python API#
This section covers how to use the NeMo Guardrails library Python API to run guardrailed inference and integrate the guardrails into your application.
Overview
RailsConfig and LLMRails core classes for generating guarded responses.
Core Classes
RailsConfig and LLMRails class reference for loading and running guardrails.
Generation Options
Configure logging, LLM parameters, and rail selection for generation.
Streaming
Stream LLM responses in real-time with the stream_async method.
Event-Based API
Use generate_events for low-level control over guardrails execution.