Commit b6f4e6c
feat: add reasoning guardrail connector (NVIDIA-NeMo#1565)
* add reasoning guardrail connector
Signed-off-by: Makesh Sreedhar <makeshn@nvidia.com>
* update reasoning guardrail prompt
Signed-off-by: Makesh Sreedhar <makeshn@nvidia.com>
* feat(content_safety): add reasoning_enabled to prompt ctx
Include the `reasoning_enabled` flag from the content safety config in
the context passed to both input and output content safety check
prompts.
This enables prompt templates to conditionally adjust behavior based on
the reasoning setting. Removes redundant config exposure in
LLMTaskManager's default context.
* revert streamers.py change
* test(content_safety): add Nemotron reasoning parser tests
* Revert "revert streamers.py change"
This reverts commit e916dd4.
* fix: add type ignore for streamer import
* minor updates to docs, example
Signed-off-by: Makesh Sreedhar <makeshn@nvidia.com>
---------
Signed-off-by: Makesh Sreedhar <makeshn@nvidia.com>
Co-authored-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>1 parent 8e8c053 commit b6f4e6c
13 files changed
Lines changed: 1172 additions & 3 deletions
File tree
- docs/getting-started/tutorials
- examples/configs/content_safety_reasoning
- nemoguardrails
- library/content_safety
- llm
- providers/huggingface
- rails/llm
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
28 | 35 | | |
29 | 36 | | |
30 | 37 | | |
| |||
53 | 60 | | |
54 | 61 | | |
55 | 62 | | |
| 63 | + | |
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
| |||
0 commit comments