We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e964c9 commit 2764cefCopy full SHA for 2764cef
tests/test_validator.py
@@ -3,13 +3,13 @@
3
4
from guardrails import Guard
5
import pytest
6
-from validator import ValidatorTemplate
+from validator import ShieldGemma2B
7
8
# We use 'exception' as the validator's fail action,
9
# so we expect failures to always raise an Exception
10
# Learn more about corrective actions here:
11
# https://www.guardrailsai.com/docs/concepts/output/#%EF%B8%8F-specifying-corrective-actions
12
-guard = Guard.from_string(validators=[ValidatorTemplate(arg_1="arg_1", arg_2="arg_2", on_fail="exception")])
+guard = Guard.from_string(validators=[ShieldGemma2B(arg_1="arg_1", arg_2="arg_2", on_fail="exception")])
13
14
def test_pass():
15
test_output = "pass"
0 commit comments