mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 21:05:19 +00:00
Merge pull request #9619 from XingjianXie/fix_after_tag
Fix tag_content_handler issue
This commit is contained in:
commit
4271b652a5
1 changed files with 2 additions and 2 deletions
|
|
@ -1260,10 +1260,10 @@ async def process_chat_response(
|
||||||
match.end() :
|
match.end() :
|
||||||
] # Content after opening tag
|
] # Content after opening tag
|
||||||
|
|
||||||
# Remove the start tag from the currently handling text block
|
# Remove the start tag and after from the currently handling text block
|
||||||
content_blocks[-1]["content"] = content_blocks[-1][
|
content_blocks[-1]["content"] = content_blocks[-1][
|
||||||
"content"
|
"content"
|
||||||
].replace(match.group(0), "")
|
].replace(match.group(0) + after_tag, "")
|
||||||
|
|
||||||
if before_tag:
|
if before_tag:
|
||||||
content_blocks[-1]["content"] = before_tag
|
content_blocks[-1]["content"] = before_tag
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue