Struct NeMo Guardrails Config

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.

pub struct NeMoGuardrailsConfig {Show 15 fields
    pub version: u32,
    pub mode: String,
    pub config_path: Option<String>,
    pub config_yaml: Option<String>,
    pub colang_content: Option<String>,
    pub codec: Option<String>,
    pub input: bool,
    pub output: bool,
    pub tool_input: bool,
    pub tool_output: bool,
    pub priority: i32,
    pub remote: Option<RemoteBackendConfig>,
    pub local: Option<LocalBackendConfig>,
    pub request_defaults: Option<RequestDefaultsConfig>,
    pub policy: ConfigPolicy,
}

Canonical config document for the planned NeMo Guardrails component.

Fields

version: u32

NeMo Guardrails config schema version.

mode: String

Backend mode: remote or local.

config_path: Option<String>

Path to a native NeMo Guardrails config directory.

config_yaml: Option<String>

Inline native NeMo Guardrails YAML config.

colang_content: Option<String>

Optional inline Colang content. Valid only with config_yaml.

codec: Option<String>

Provider request/response codec for LLM-managed surfaces.

input: bool

Whether to run input rails around managed LLM execution.

output: bool

Whether to run output rails around managed LLM execution.

tool_input: bool

Whether to run tool-input rails around managed tool execution.

tool_output: bool

Whether to run tool-output rails around managed tool execution.

priority: i32

Intercept priority. Lower values run earlier.

remote: Option<RemoteBackendConfig>

Remote-backend settings used when mode = "remote".

local: Option<LocalBackendConfig>

Local-backend settings used when mode = "local".

request_defaults: Option<RequestDefaultsConfig>

Default request semantics passed through to the selected Guardrails backend.

This models request-time concepts such as rail selection and generation options without claiming backend parity for every Guardrails feature.

policy: ConfigPolicy

Component-local unsupported-config policy.

Trait Implementations

impl Clone for NeMoGuardrailsConfig

impl Clone for NeMoGuardrailsConfig

clone

fn clone(&self) -> NeMoGuardrailsConfig

clone_from

fn clone_from(&mut self, source: &Self)

impl Debug for NeMoGuardrailsConfig

impl Debug for NeMoGuardrailsConfig

fmt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Default for NeMoGuardrailsConfig

impl Default for NeMoGuardrailsConfig

default

fn default() -> Self

impl<'de> Deserialize<'de> for NeMoGuardrailsConfig

impl<'de> Deserialize<'de> for NeMoGuardrailsConfig

deserialize

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,

impl EditorConfig for NeMoGuardrailsConfig

impl EditorConfig for NeMoGuardrailsConfig

editor_schema

fn editor_schema() -> &'static EditorSchema

impl Serialize for NeMoGuardrailsConfig

impl Serialize for NeMoGuardrailsConfig

serialize

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
    __S: Serializer,