mirror of
https://github.com/open-webui/open-webui.git
synced 2025-03-28 18:52:14 +01:00
refac
This commit is contained in:
parent
5d3f778b2a
commit
b1bcca90b5
@ -966,12 +966,12 @@ async def process_chat_response(
|
|||||||
if not data.strip():
|
if not data.strip():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# "data: " is the prefix for each event
|
# "data:" is the prefix for each event
|
||||||
if not data.startswith("data: "):
|
if not data.startswith("data:"):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Remove the prefix
|
# Remove the prefix
|
||||||
data = data[len("data: ") :]
|
data = data[len("data:") :].strip()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
data = json.loads(data)
|
data = json.loads(data)
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
export let touch = true;
|
export let touch = true;
|
||||||
export let className = 'flex';
|
export let className = 'flex';
|
||||||
export let theme = '';
|
export let theme = '';
|
||||||
|
export let offset = [0, 4];
|
||||||
export let allowHTML = true;
|
export let allowHTML = true;
|
||||||
export let tippyOptions = {};
|
export let tippyOptions = {};
|
||||||
|
|
||||||
@ -29,7 +30,7 @@
|
|||||||
touch: touch,
|
touch: touch,
|
||||||
...(theme !== '' ? { theme } : { theme: 'dark' }),
|
...(theme !== '' ? { theme } : { theme: 'dark' }),
|
||||||
arrow: false,
|
arrow: false,
|
||||||
offset: [0, 4],
|
offset: offset,
|
||||||
...tippyOptions
|
...tippyOptions
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user