nemoguardrails.library.topic_safety.actions
nemoguardrails.library.topic_safety.actions
This page is for version v0.24.1.
For other versions, use one of these documentation indexes:
- Latest (default): https://docs.nvidia.com/nemo/guardrails/latest/llms.txt
- v0.24.1: https://docs.nvidia.com/nemo/guardrails/v0.24.1/llms.txt
- v0.24.0: https://docs.nvidia.com/nemo/guardrails/v0.24.0/llms.txt
- v0.23.0: https://docs.nvidia.com/nemo/guardrails/v0.23.0/llms.txt
- v0.22.0: https://docs.nvidia.com/nemo/guardrails/v0.22.0/llms.txt
Module Contents
Functions
| Name | Description |
|---|---|
topic_safety_check_input | - |
Data
TOPIC_SAFETY_OUTPUT_RESTRICTION
API
nemoguardrails.library.topic_safety.actions.topic_safety_check_input(llms: typing.Dict[str, nemoguardrails.types.LLMModel],llm_task_manager: nemoguardrails.llm.taskmanager.LLMTaskManager,model_name: typing.Optional[str] = None,context: typing.Optional[dict] = None,user_message: typing.Optional[str] = None,events: typing.Optional[typing.List[dict]] = None,model_caches: typing.Optional[typing.Dict[str, nemoguardrails.llm.cache.CacheInterface]] = None,kwargs = {}
async
nemoguardrails.library.topic_safety.actions.TOPIC_SAFETY_OUTPUT_RESTRICTION = 'If any of the above conditions are violated, please respond with "off-topic". O...
nemoguardrails.library.topic_safety.actions.TOPIC_SAFETY_TEMPERATURE = 0.01
nemoguardrails.library.topic_safety.actions.log = logging.getLogger(__name__)