mirror of
https://github.com/hoshikawa2/nemo_guardrails_configuration.git
synced 2026-07-09 17:04:20 +00:00
6 lines
255 B
Python
6 lines
255 B
Python
from pathlib import Path
|
|
import yaml
|
|
def load_guardrail_registry(path=None):
|
|
if path is None: path=Path(__file__).resolve().parent.parent/'config'/'guardrails.yaml'
|
|
with open(path,'r',encoding='utf-8') as f: return yaml.safe_load(f)['guardrails']
|