Adding new Tool Call "Annotations" to tool macro #184
Merged
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.
I added the new tool annotation feature to the tool call macro. Currently it just parses the annotation field as json, so that one might potentially be able to simply copy and paste the field from elsewhere into the macro invocation. This might not be optimal for several reasons, one being that the signature must be written in camel case, with no indication to the user that a non-camel-cased value is incorrect, even if they looked at the expanded macro. A solution to this would be to create a wrapper over ToolAnnotations (or annotate ToolAnnotations itself) with
deny_unknown_fields. However, this would also prevent the annotation macro from being future proof (currently if the annotation were to be deprecated, then we could silently ignore it).Here's an example usage taken from the test I added