-
Notifications
You must be signed in to change notification settings - Fork 0
Fix Qwen3.5 tool calling #6
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
a47f334
6be5dfc
600f712
49110a1
b672eac
7a5b0a9
2bf261d
34b828b
ec015a2
6efe31c
233c467
f888b37
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -70,8 +70,8 @@ public enum ToolCallFormat: String, Sendable, Codable, CaseIterable { | |||||
| /// Example: `<|tool_call_start|>[func(arg='value')]<|tool_call_end|>` | ||||||
| case lfm2 | ||||||
|
|
||||||
| /// XML function format used by Qwen3 Coder. | ||||||
| /// Example: `<function=name><parameter=key>value</parameter></function>` | ||||||
| /// XML function format used by Nemotron, Qwen3 Coder, Qwen3.5, and similar models. | ||||||
| /// Example: `<tool_call><function=name><parameter=key>value</parameter></function></tool_call>` | ||||||
| case xmlFunction = "xml_function" | ||||||
|
|
||||||
| /// GLM4 format with arg_key/arg_value tags. | ||||||
|
|
@@ -106,7 +106,7 @@ public enum ToolCallFormat: String, Sendable, Codable, CaseIterable { | |||||
| return PythonicToolCallParser( | ||||||
| startTag: "<|tool_call_start|>", endTag: "<|tool_call_end|>") | ||||||
| case .xmlFunction: | ||||||
| return XMLFunctionParser() | ||||||
| return XMLFunctionParser(startTag: "<tool_call>", endTag: "</tool_call>") | ||||||
|
||||||
| return XMLFunctionParser(startTag: "<tool_call>", endTag: "</tool_call>") | |
| return XMLFunctionParser(startTag: nil, endTag: nil) |
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 doc comment at the top still describes the XML function format as unwrapped (
<function=...><parameter=...>...</parameter></function>), but the parser is now configured/used with<tool_call>...</tool_call>wrapper tags. Please update the comment to match the actual supported/expected format (and ideally mention whether unwrapped output is still supported).