-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Initialize the delta tool call fields explicitly #17340
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
Initialize the delta tool call fields explicitly #17340
Conversation
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
Previously the implementation relied on a combination of the default field values being and `model_dump_json(exclude_unset=True)`. This led to bugs such as the "type" field missing from the response. The behavior of the OpenAI API is to set the "id" and "type" fields only in the first Delta object. The purpose of this commit is to make all the places where these fields need to be set explicit. Signed-off-by: Max de Bayser <mbayser@br.ibm.com> Co-authored-by: igmainc <igmainc@icloud.com>
3fa8474
to
2fa00dd
Compare
This looks good to me, let's have @iGmainC verify first though |
Agreed |
Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
OK, I will test it as soon as possible. |
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. LGTM
Tests are failing though |
@iGmainC , did you get a chance to test on your side? The CI tests are passing now. |
I briefly tested my scene and it seemed to be ok. |
Signed-off-by: Max de Bayser <mbayser@br.ibm.com> Co-authored-by: igmainc <igmainc@icloud.com>
Signed-off-by: Max de Bayser <mbayser@br.ibm.com> Co-authored-by: igmainc <igmainc@icloud.com> Signed-off-by: Yuqi Zhang <yuqizhang@google.com>
Signed-off-by: Max de Bayser <mbayser@br.ibm.com> Co-authored-by: igmainc <igmainc@icloud.com> Signed-off-by: minpeter <kali2005611@gmail.com>
Fixes #16340
Continuing the work of #16340
Previously the implementation relied on a combination of the default field values being and
model_dump_json(exclude_unset=True)
. This led to bugs such as the "type" field missing from the response.The behavior of the OpenAI API is to set the "id" and "type" fields only in the first Delta object.
The purpose of this commit is to make all the places where these fields need to be set explicit.