nemoguardrails.manifests.surface_reference
nemoguardrails.manifests.surface_reference
Parsing and normalization for configured rail surface references.
Module Contents
Functions
Data
API
Return the surface name prefix without validating its parameters.
Malformed parameter syntax may still yield a normalized name.
Parse one complete configured surface reference.
The accepted syntax is a bare surface name followed by zero or more
whitespace-separated $name=value parameters. Spaces around = and
parenthesized parameters are not supported. Values remain strings; bare
values end at whitespace, while single- or double-quoted values may contain
whitespace and punctuation.
Raises:
ValueError: If the reference is empty, contains controls, or has malformed, blank, adjacent, or duplicate parameters.