nemoguardrails.library.self_check.input_check.actions

View as Markdown

Module Contents

Functions

NameDescription
self_check_inputChecks the input from the user.

Data

log

API

nemoguardrails.library.self_check.input_check.actions.self_check_input(
llm_task_manager: nemoguardrails.llm.taskmanager.LLMTaskManager,
context: typing.Optional[dict] = None,
llm: typing.Optional[nemoguardrails.types.LLMModel] = None,
config: typing.Optional[nemoguardrails.RailsConfig] = None,
kwargs = {}
)
async

Checks the input from the user.

Prompt the LLM, using the check_input task prompt, to determine if the input from the user should be allowed or not.

Returns:

True if the input should be allowed, False otherwise.

nemoguardrails.library.self_check.input_check.actions.log = logging.getLogger(__name__)