-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Update tool parser and related documentation #11223
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
Changes from all commits
fd18079
4df3784
9e5dbea
fcb55d7
eed2bfc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -527,7 +527,13 @@ def __post_init__(self): | |||||||||||||||||||||||
| self._handle_other_validations() | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| def _handle_deprecated_args(self): | ||||||||||||||||||||||||
| pass | ||||||||||||||||||||||||
| # handle deprecated tool call parsers | ||||||||||||||||||||||||
| deprecated_tool_call_parsers = {"qwen25": "qwen", "glm45": "glm"} | ||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I saw qwen25 still exists in the above map.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, here is just for the warning... Maybe remove in future |
||||||||||||||||||||||||
| if self.tool_call_parser in deprecated_tool_call_parsers: | ||||||||||||||||||||||||
| logger.warning( | ||||||||||||||||||||||||
| f"The tool_call_parser '{self.tool_call_parser}' is deprecated. Please use '{deprecated_tool_call_parsers[self.tool_call_parser]}' instead." | ||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||
| self.tool_call_parser = deprecated_tool_call_parsers[self.tool_call_parser] | ||||||||||||||||||||||||
|
Comment on lines
+532
to
+536
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To improve readability and avoid multiple dictionary lookups, you can store the new parser name in a variable. Additionally, the
Suggested change
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| def _handle_missing_default_values(self): | ||||||||||||||||||||||||
| if self.tokenizer_path is None: | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path
..deepseekv32.jinjain the note is a bit ambiguous and could be a typo. For clarity and to avoid user confusion, it's better to provide the full relative path from the project root, similar to the other examples. Also, "Or" is typically not capitalized in parentheses.