mirror of
https://github.com/hoshikawa2/nemo_guardrails_configuration.git
synced 2026-07-09 17:04:20 +00:00
First Commit
This commit is contained in:
@@ -1,43 +1,11 @@
|
||||
models:
|
||||
- type: main
|
||||
engine: openai
|
||||
model: gpt-4.1
|
||||
parameters:
|
||||
temperature: 0.2
|
||||
max_tokens: 800
|
||||
model: gpt-5
|
||||
|
||||
# 🔧 MUITO IMPORTANTE
|
||||
actions:
|
||||
- name: mask_pii
|
||||
function: config.actions.action_mask_pii
|
||||
colang_version: "1.0"
|
||||
|
||||
- name: detectar_toxicidade
|
||||
function: config.actions.action_detectar_toxicidade
|
||||
|
||||
- name: detectar_out_of_scope
|
||||
function: config.actions.action_detectar_out_of_scope
|
||||
|
||||
- name: validar_alcada
|
||||
function: config.actions.action_validar_alcada
|
||||
|
||||
- name: validar_groundedness
|
||||
function: config.actions.action_validar_groundedness
|
||||
|
||||
- name: verbalizacao_prematura
|
||||
function: config.actions.action_verbalizacao_prematura
|
||||
|
||||
- name: cmp
|
||||
function: config.actions.action_cmp
|
||||
|
||||
# 🧠 Organização dos rails
|
||||
rails:
|
||||
input:
|
||||
dialog:
|
||||
flows:
|
||||
- input_check_toxicidade
|
||||
- input_check_out_of_scope
|
||||
|
||||
output:
|
||||
flows:
|
||||
- output_check_verbalizacao_prematura
|
||||
- output_check_groundedness
|
||||
- output_check_cmp
|
||||
- main
|
||||
7
nemo_guardrails_tracing_project/config/rails/flows.co
Normal file
7
nemo_guardrails_tracing_project/config/rails/flows.co
Normal file
@@ -0,0 +1,7 @@
|
||||
define user express input
|
||||
$input_text
|
||||
|
||||
define flow main
|
||||
user express input
|
||||
execute executar_pipeline_validacoes
|
||||
bot say $nemo_response
|
||||
@@ -1,12 +0,0 @@
|
||||
define flow input_check_toxicidade
|
||||
user input
|
||||
$r = execute detectar_toxicidade(text=$user_input)
|
||||
if $r.allowed == False
|
||||
bot respond "BLOCKED:TOX"
|
||||
|
||||
|
||||
define flow input_check_out_of_scope
|
||||
user input
|
||||
$r = execute detectar_out_of_scope(text=$user_input)
|
||||
if $r.allowed == False
|
||||
bot respond "BLOCKED:OOS"
|
||||
@@ -1,27 +0,0 @@
|
||||
define flow output_check_cmp
|
||||
|
||||
$r = execute cmp(resposta="dummy")
|
||||
|
||||
if $r.allowed == False
|
||||
bot respond "BLOCKED:CMP"
|
||||
|
||||
bot respond "OK"
|
||||
|
||||
|
||||
define flow output_check_verbalizacao_prematura
|
||||
|
||||
$r = execute verbalizacao_prematura(resposta="dummy")
|
||||
|
||||
if $r.allowed == False
|
||||
bot respond "BLOCKED:REVPREC"
|
||||
|
||||
bot respond "OK"
|
||||
|
||||
define flow output_check_groundedness
|
||||
|
||||
$r = execute validar_groundedness(resposta="dummy")
|
||||
|
||||
if $r.allowed == False
|
||||
bot respond "BLOCKED:GND"
|
||||
|
||||
bot respond "OK"
|
||||
Reference in New Issue
Block a user