-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] Functionality for testing a Guard configured to run on prompt in isolation #996
Comments
So the idea here is to allow passing input values to validate right? i.e. instead of only accepting an I think that makes a lot of sense. Technically you can accomplish the same thing by treating the input value as an output value but that's a little bit of mental gymnastics if you're used to passing it as a particular kwarg in other flows. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
Quick research on supporting this: |
So what would that API look like?
|
Basically, yes. The other option I was thinking of which is a little more aggressive and not backwards compatible is to instead collapse |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue was closed because it has been stalled for 14 days with no activity. |
Planned! |
Description
Currently,
guard.validate
only works for guards that are configured to run on the output. Having validate work on guards configured for prompt or inputs would be super helpful to quickly test out if an input guard is working as expected.E.g., the following code raises no exceptions for me:
Removing the
on="msg_history"
arg raises an exception as expected.However, this makes the burden of quick testing a guard more frictional.
Why is this needed
Demo-ing, more control to end users
The text was updated successfully, but these errors were encountered: