Skip to content

Commit b7bf98f

Browse files
Algorithm5838github-actions[bot]
authored andcommitted
fix: skip reasoning tag preceded by text
1 parent 2c36e36 commit b7bf98f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

backend/open_webui/utils/middleware.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3676,6 +3676,10 @@ def set_last_text(out, text):
36763676
before_tag = item_text[: match.start()]
36773677
after_tag = item_text[match.end() :]
36783678

3679+
# Tag in prose text, skip it.
3680+
if before_tag.strip():
3681+
continue
3682+
36793683
# Keep only text before the tag in the message
36803684
set_last_text(output, before_tag)
36813685

0 commit comments

Comments
 (0)