mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[PR #13089] [MERGED] fix: handling tool calls in streamed responses #9892
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/13089
Author: @izumi0004
Created: 4/20/2025
Status: ✅ Merged
Merged: 4/20/2025
Merged by: @tjbck
Base:
dev← Head:fix/tool_calls📝 Commits (1)
99ce85ffix: handling tool calls in streamed responses📊 Changes
1 file changed (+9 additions, -0 deletions)
View changed files
📝
backend/open_webui/utils/middleware.py(+9 -0)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
stream_body_handlerwith tool calls. Previously if the first chunk of an object intool_callsis incomplete (e.g. the["function"]["arguments"]key is missing), subsequent updates to it will raise a KeyError. This bug affects some models when using native tool calls.Fixed
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the CONTRIBUTOR_LICENSE_AGREEMENT, and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.