From 24e7e77b55e7758f7bd07e07016cc88b8b188c8b Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Fri, 13 Mar 2026 12:37:10 -0700 Subject: [PATCH] Clean up --- modules/chat.py | 2 +- modules/ui_chat.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/chat.py b/modules/chat.py index 2c6f0ab2..87e52851 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -1330,7 +1330,7 @@ def generate_chat_reply_wrapper(text, state, regenerate=False, _continue=False): # by the template (which adds its own channel markup). clean = content_prefix.strip() if '<|channel|>' in clean and '<|message|>' in clean: - inner = clean.split('<|message|>', 1)[1] if '<|message|>' in clean else clean + inner = clean.split('<|message|>', 1)[1] if '<|end|>' in inner: inner = inner.split('<|end|>', 1)[0] clean = inner.strip() diff --git a/modules/ui_chat.py b/modules/ui_chat.py index ea341fa6..ce9fc0a2 100644 --- a/modules/ui_chat.py +++ b/modules/ui_chat.py @@ -99,8 +99,6 @@ def create_ui(): def sync_web_tools(selected): if 'web_search' in selected and 'fetch_webpage' not in selected: selected.append('fetch_webpage') - elif 'web_search' not in selected and 'fetch_webpage' in selected: - selected.remove('fetch_webpage') return gr.update(value=selected)