Exceptions
Guardrail exceptions.
- exception smarter.apps.guardrail.exceptions.SmarterGuardrailException(message='')[source]
Bases:
SmarterExceptionBase class for all guardrail exceptions.
Exceptions raised by the Guardrail service.
- exception smarter.apps.guardrail.services.exceptions.GuardrailBlockedError(message, guardrail_name=None)[source]
Bases:
GuardrailServiceErrorRaised by the prompt pipeline when an input guardrail blocks the user’s message.
- Parameters:
- exception smarter.apps.guardrail.services.exceptions.GuardrailConfigError[source]
Bases:
GuardrailServiceErrorRaised for a
Guardrailwhose configuration is.invalid or incomplete for its strategy, e.g.
strategy=regexwithout apattern.Manifests are validated when they are applied, so this indicates a Guardrail that was changed outside of a manifest, e.g. in the Django admin.
- exception smarter.apps.guardrail.services.exceptions.GuardrailProviderError[source]
Bases:
GuardrailServiceErrorRaised when a strategy’s call to an LLM provider fails, or returns an unusable result.
- exception smarter.apps.guardrail.services.exceptions.GuardrailServiceError[source]
Bases:
ExceptionBase class for all guardrail-service errors.
- exception smarter.apps.guardrail.services.exceptions.GuardrailStrategyNotImplementedError[source]
Bases:
GuardrailServiceErrorRaised when a Guardrail’s strategy has no implementation.