-
Notifications
You must be signed in to change notification settings - Fork 23
feat: allow users to add constraints and validators to ToolParam
#222
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
Open
bcallender
wants to merge
3
commits into
main
Choose a base branch
from
feat/tool-param-validators
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
979a81e to
343929d
Compare
80d2d98 to
71fdd1d
Compare
343929d to
392169d
Compare
71fdd1d to
92e2cde
Compare
392169d to
f5ebd6d
Compare
92e2cde to
a9d001c
Compare
f5ebd6d to
581a62a
Compare
a9d001c to
d0f2c71
Compare
581a62a to
3214073
Compare
d0f2c71 to
03488ff
Compare
cddc32b to
99b3991
Compare
e2b688c to
7f7c9f3
Compare
99b3991 to
52be67d
Compare
7f7c9f3 to
133cc79
Compare
52be67d to
17e9bbf
Compare
133cc79 to
5cf647b
Compare
17e9bbf to
da184da
Compare
5cf647b to
60bd917
Compare
da184da to
5d9d16a
Compare
60bd917 to
3ea2993
Compare
5d9d16a to
95058fe
Compare
3ea2993 to
507902a
Compare
95058fe to
1cddcec
Compare
c74b8cc to
5d5f1bb
Compare
1cddcec to
97d0650
Compare
b3c50ff to
52b0007
Compare
3257fef to
088602e
Compare
03ce63e to
2090362
Compare
088602e to
00c5bb6
Compare
2090362 to
57c7ef1
Compare
00c5bb6 to
9d0212c
Compare
57c7ef1 to
d41f806
Compare
3a55e47 to
63bbe0b
Compare
e101741 to
87d5ce7
Compare
63bbe0b to
ed2b8e8
Compare
87d5ce7 to
9e7cb49
Compare
ed2b8e8 to
9fbcb00
Compare
b6cf999 to
492d074
Compare
492d074 to
79f4513
Compare
79f4513 to
afc439c
Compare
…me issues that came up
…the dependencies in ci so the tests will run there
afc439c to
3a3a04f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

TL;DR
Added parameter constraints and validators to tool parameters to enable better validation of user inputs.
What changed?
NumericConstraintandToolParameterConstraintsmessage types to the protocol buffer definitionsToolParametermessage to support numeric bounds (gt, ge, lt, le), multiple_of, min/max length, and regex pattern validationToolParameterto support custom validatorsParamValidatorprotocolRegexValidatorimplementation with comprehensive regex validationHow to test?
Why make this change?
This change enhances the tool parameter system by adding robust validation capabilities. By supporting both declarative constraints (like min/max values, length limits) and custom validators, we can ensure that user inputs meet specific requirements before executing tool functions. This improves error handling, security, and user experience by providing immediate feedback on invalid inputs rather than failing during execution.