Skip to content

Commit 5ce715b

Browse files
committed
fix: anchor reasoning tag detection to line start
1 parent fd074c0 commit 5ce715b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

backend/open_webui/utils/middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3312,7 +3312,7 @@ def set_last_text(out, text):
33123312
if start_tag.startswith('<') and start_tag.endswith('>'):
33133313
start_tag_pattern = rf'<{re.escape(start_tag[1:-1])}(\s.*?)?>'
33143314

3315-
match = re.search(start_tag_pattern, item_text)
3315+
match = re.match(rf'\s*{start_tag_pattern}', item_text)
33163316
if match:
33173317
try:
33183318
attr_content = match.group(1) if match.group(1) else ''

0 commit comments

Comments
 (0)