Skip to content

Commit b4eb516

Browse files
updated example
1 parent a48a4e7 commit b4eb516

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

docs/concepts/validator_on_fail_actions.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ ${order}
6565
${gr.complete_xml_suffix_v2}
6666
"""
6767

68-
order = """I want a burger with large fries and a coke."""
68+
order = """I want a burger with two large fries and a coke zero."""
6969

7070
# MinimumOneRange is a hypothetical custom validator that an integer > 0 is supplied
7171
class Lineitem(BaseModel):
@@ -84,12 +84,11 @@ response = guard(
8484
"content": prompt
8585
}],
8686
prompt_params={"order": order},
87-
num_reasks=2,
8887
)
8988

9089
print(response.validated_output)
9190

9291
# [{'item': 'burger', 'quantity': 1},
93-
# {'item': 'fries', 'quantity': 1},
94-
# {'item': 'coke', 'quantity': 1}]
92+
# {'item': 'fries', 'quantity': 2},
93+
# {'item': 'coke zero', 'quantity': 1}]
9594
```

0 commit comments

Comments
 (0)