mirror of
https://github.com/open-webui/open-webui
synced 2025-05-18 04:15:07 +00:00
Fix tag_content_handler issue: after_tag should be remove from the current content_blocks
This commit is contained in:
parent
14398ab628
commit
c56bedc5ff
@ -1260,10 +1260,10 @@ async def process_chat_response(
|
||||
match.end() :
|
||||
] # 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"
|
||||
].replace(match.group(0), "")
|
||||
].replace(match.group(0) + after_tag, "")
|
||||
|
||||
if before_tag:
|
||||
content_blocks[-1]["content"] = before_tag
|
||||
|
Loading…
Reference in New Issue
Block a user