mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac/fix: tag attribute handling
This commit is contained in:
parent
3e8d3b08fa
commit
b43acc2b3d
1 changed files with 7 additions and 3 deletions
|
|
@ -1619,9 +1619,13 @@ async def process_chat_response(
|
||||||
|
|
||||||
match = re.search(start_tag_pattern, content)
|
match = re.search(start_tag_pattern, content)
|
||||||
if match:
|
if match:
|
||||||
attr_content = (
|
try:
|
||||||
match.group(1) if match.group(1) else ""
|
attr_content = (
|
||||||
) # Ensure it's not None
|
match.group(1) if match.group(1) else ""
|
||||||
|
) # Ensure it's not None
|
||||||
|
except:
|
||||||
|
attr_content = ""
|
||||||
|
|
||||||
attributes = extract_attributes(
|
attributes = extract_attributes(
|
||||||
attr_content
|
attr_content
|
||||||
) # Extract attributes safely
|
) # Extract attributes safely
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue