nemoguardrails.library.fiddler.actions
Module Contents
Functions
Data
API
Check the bot message with the Fiddler faithfulness guardrail.
Scores at or below the configured threshold block. Missing content, missing endpoint configuration, and handled provider failures fail open.
Parameters:
Rails configuration containing the Fiddler settings.
Runtime context containing the bot message and relevant chunks.
Optional caller-owned HTTP client.
Returns: RailOutcome
An allow or block outcome.
Raises:
ValueError: IfFIDDLER_API_KEYis not set.
Evaluate content with a Fiddler guardrail endpoint.
Non-success responses, HTTP client failures, and expected score-processing failures are logged and fail open.
Parameters:
Fiddler guardrail endpoint.
Guardrail-specific request data.
Name used in diagnostic messages.
Response score used for the decision.
Configured decision threshold.
Comparison used to determine whether content is blocked.
Score used when the response omits score_key.
Optional caller-owned HTTP client.
Returns: bool
True when the guardrail blocks the content, otherwise False.
Raises:
ValueError: IfFIDDLER_API_KEYis not set.
Check the bot message with the Fiddler safety guardrail.
Scores at or above the configured threshold block. Missing content, missing endpoint configuration, and handled provider failures fail open.
Parameters:
Rails configuration containing the Fiddler settings.
Runtime context containing the bot message.
Optional caller-owned HTTP client.
Returns: RailOutcome
An allow or block outcome.
Raises:
ValueError: IfFIDDLER_API_KEYis not set.
Check the user message with the Fiddler safety guardrail.
Scores at or above the configured threshold block. Missing content, missing endpoint configuration, and handled provider failures fail open.
Parameters:
Rails configuration containing the Fiddler settings.
Runtime context containing the user message.
Optional caller-owned HTTP client.
Returns: RailOutcome
An allow or block outcome.
Raises:
ValueError: IfFIDDLER_API_KEYis not set.