Skip to content

Commit d389d14

Browse files
committed
move to a smaller validator
1 parent 53108b5 commit d389d14

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

server_ci/guard-template.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@
99
"name": "test-guard",
1010
"validators": [
1111
{
12-
"id": "guardrails/detect_pii",
13-
"on": "msg_history",
14-
"onFail": "fix",
15-
"kwargs": {
16-
"pii_entities": ["PERSON","PHONE_NUMBER","LOCATION"]
17-
}
12+
"id": "guardrails/two_words",
13+
"on": "$",
14+
"onFail": "fix"
1815
}
1916
]
2017
}

server_ci/tests/test_server.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
[
1515
(
1616
"France is wonderful in the spring",
17-
"France is wonderful in the spring",
17+
"France is",
1818
True,
1919
False,
2020
),
@@ -37,7 +37,7 @@ def test_guard_validation(mock_llm_output, validation_output, validation_passed,
3737
[
3838
(
3939
"Tell me about Oranges in 5 words",
40-
"Citrus fruit, sweet, nutritious, vibrant.",
40+
"Citrus fruit",
4141
True,
4242
False,
4343
),
@@ -69,10 +69,9 @@ def test_server_guard_llm_integration(
6969
@pytest.mark.parametrize(
7070
"message_content, output, validation_passed, error",
7171
[
72-
("Tell me about Paris in 5 words", "doesnt matter this errors", True, True),
7372
(
7473
"Write 5 words of prose.",
75-
"Whispers of dawn kissed the horizon.",
74+
"Whispers of",
7675
True,
7776
False,
7877
),

0 commit comments

Comments
 (0)