From 45f88b80adf1f4902849d593589a10e0b919e7ad Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Thu, 23 Jan 2025 12:53:17 -0800 Subject: [PATCH] refac: think status --- backend/open_webui/utils/middleware.py | 2 +- src/lib/components/common/Collapsible.svelte | 32 +++++- src/lib/dayjs.js | 104 +++++++++++++++++++ 3 files changed, 136 insertions(+), 2 deletions(-) create mode 100644 src/lib/dayjs.js diff --git a/backend/open_webui/utils/middleware.py b/backend/open_webui/utils/middleware.py index e256a8f82..895f1bfd1 100644 --- a/backend/open_webui/utils/middleware.py +++ b/backend/open_webui/utils/middleware.py @@ -1170,7 +1170,7 @@ async def process_chat_response( ) # Format reasoning with
tag - content = f'{ongoing_content}
\nThought for {reasoning_duration} seconds\n{reasoning_display_content}\n
\n' + content = f'{ongoing_content}
\nThought for {reasoning_duration} seconds\n{reasoning_display_content}\n
\n' else: content = "" diff --git a/src/lib/components/common/Collapsible.svelte b/src/lib/components/common/Collapsible.svelte index e6e980ea4..2db89d208 100644 --- a/src/lib/components/common/Collapsible.svelte +++ b/src/lib/components/common/Collapsible.svelte @@ -1,5 +1,29 @@