Open
Conversation
…er anthropic spec which forces the model to call the tool by the provided name. were not submitting multiple tools here so we should always call the tool generated by the schema definition.
Contributor
There was a problem hiding this comment.
👍 Looks good to me! Reviewed everything up to a52470d in 36 seconds
More details
- Looked at
36lines of code in1files - Skipped
0files when reviewing. - Skipped posting
2drafted comments based on config settings.
1. lib/instructor/anthropic/patch.rb:26
- Draft comment:
Ensure that removing::Anthropic.configuration.extra_headersdoes not affect other parts of the system that might rely on this header. - Reason this comment was not posted:
Confidence changes required:50%
The removal of::Anthropic.configuration.extra_headersmight affect other parts of the system relying on this header. It's important to ensure that this change doesn't break any existing functionality.
2. lib/instructor/anthropic/patch.rb:24
- Draft comment:
The logic for settingparameters[:max_tokens] = 1024is repeated. Consider refactoring to a method to adhere to the DRY principle. - Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_FVV5G1QjYhmYZeFw
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.
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
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.
Hi, this is both a bug fix, and a quick feature implementing tool choice per anthropics api
Important
Adds tool choice configuration to Anthropic API requests in
patch.rb.build_tool_choicefunction inpatch.rbto construct tool choice configuration for API requests.messagesfunction inpatch.rbto merge parameters with tool choice configuration.This description was created by
for a52470d. It will automatically update as commits are pushed.