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 a48a4e7 commit b4eb516Copy full SHA for b4eb516
docs/concepts/validator_on_fail_actions.md
@@ -65,7 +65,7 @@ ${order}
65
${gr.complete_xml_suffix_v2}
66
"""
67
68
-order = """I want a burger with large fries and a coke."""
+order = """I want a burger with two large fries and a coke zero."""
69
70
# MinimumOneRange is a hypothetical custom validator that an integer > 0 is supplied
71
class Lineitem(BaseModel):
@@ -84,12 +84,11 @@ response = guard(
84
"content": prompt
85
}],
86
prompt_params={"order": order},
87
- num_reasks=2,
88
)
89
90
print(response.validated_output)
91
92
# [{'item': 'burger', 'quantity': 1},
93
-# {'item': 'fries', 'quantity': 1},
94
-# {'item': 'coke', 'quantity': 1}]
+# {'item': 'fries', 'quantity': 2},
+# {'item': 'coke zero', 'quantity': 1}]
95
```
0 commit comments