-
Notifications
You must be signed in to change notification settings - Fork 31
fix: use "" instead of nullptr for templates requiring non null content
#72
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
Conversation
|
With the Qwen3 model's chat template being improved, it seems that the change in this PR is no longer mandatory for Qwen3 template. However, it may still be meaningful for other templates that require non-null content. |
|
Could we merge this PR? |
ochafik
left a comment
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.
Thanks @grf53 for sending this out, and sorry for the delay!!
|
This PR broke the chat-template tests? |
|
Please check the fix #75 |
That is true, tests were broken by this PR, see https://github.com/google/minja/actions/runs/15346704885/job/43184463260#step:9:7818 |
* Port content handling of #72 to python test logic * Pin dependency versions * add clangd/ to .gitignore * disable QwQ-32B test
…ontent (google#72) fix: use empty string instead of nullptr for templates requiring non null
* Port content handling of google#72 to python test logic * Pin dependency versions * add clangd/ to .gitignore * disable QwQ-32B test
Description
Due to uses of
nullptrto test templates which arecaps_.requires_non_null_content == true, the capabilities of that template are being mis-estimated.In the case I saw, even though the template covers 'tool call' and 'tool response',
caps_.supports_tool_callsandcaps_.supports_tool_responseswere bothfalse, so the tool calls and tool responses are rendered with the polyfills.Currently in
main, the non-null content requirement is being checked(caps_.requires_non_null_content), but it is difficult to find any meaningful use cases.It seems desirable that this be used to suppress the above situation.