Use the NeMo Guardrails Python APIs
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.
ConceptCore Classes
RailsConfig and LLMRails class reference for loading and running guardrails.
ReferenceGeneration Options
Configure logging, LLM parameters, and rail selection for generation.
ReferenceStreaming
Stream LLM responses in real-time with the stream_async method.
TutorialCheck Messages
Validate messages against input and output rails using check_async and check methods.
ReferenceEvent-Based API
Use generate_events for low-level control over guardrails execution.
Reference