- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 10.9k
[Chore] Add E2E test for 'required' tool_choice with streaming #24579
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: tlipoca9 <[email protected]> Signed-off-by: tlipoca9 <[email protected]>
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.
Code Review
This pull request addresses a bug where delta_text was being added twice when tool_choice was set to 'required' during streaming chat completions. The change correctly removes a redundant update to previous_texts that was causing this duplication. The fix is sound and also improves code clarity by handling the update of previous_texts in a single, consistent location at the end of the loop.
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.
Can you add an e2e test?
Signed-off-by: tlipoca9 <[email protected]>
Signed-off-by: tlipoca9 <[email protected]>
Signed-off-by: tlipoca9 <[email protected]>
| There is already a PR fixing this issue. | 
| assert serving_completion.chat_template == CHAT_TEMPLATE | ||
|  | ||
| @pytest.mark.asyncio | ||
| async def test_serving_chat_tool_choice_required_streaming(): | 
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.
E2E is also what we need, and we can keep moving forward.
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, I'll try to get this done.
Signed-off-by: tlipoca9 <[email protected]>
Signed-off-by: tlipoca9 <[email protected]>
| This pull request has merge conflicts that must be resolved before it can be | 
Signed-off-by: tlipoca9 <[email protected]>
Signed-off-by: tlipoca9 <[email protected]>
Signed-off-by: tlipoca9 <[email protected]>
Purpose
Fixes #24509
Description
The issue was that delta_text was being added twice when tool_choice was set to 'required'.