-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Bug]: stream_chunk_builder fails to include tool_calls preceded by content #2716
Comments
Hey @stephenfreund can you share what the expected response here should be? I can add fix accordingly and add it to our ci/cd! Thanks for this issue |
Hi, Absolutely. Here's an example of what I would expect. When I create a completion without streaming
I get responses like this:
where the response Happy to provide any other details that would be useful. Thanks! Steve. |
Does this still occur? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
not stale - needs to be investigated still. Adding to feb 2025 roadmap. |
cc: @vibhavbhat |
What happened?
If the stream produced by a call to
litellm.completion(..., stream=True)
contains content deltas before tool call deltas, the result of calling stream_chunk_builder on an array of all chunks from the stream fails to include the tool calls. The test case below demonstrates this issue on runs in which gpt-4 responds with first content and then a call to weather. The output of one such run is attached.Relevant log output
Twitter / LinkedIn details
No response
The text was updated successfully, but these errors were encountered: