mirror of
https://github.com/open-webui/open-webui
synced 2025-06-10 16:38:21 +00:00
skip checks in title gen
This commit is contained in:
parent
cf5201aada
commit
a655bb5a63
@ -186,20 +186,9 @@ async def generate_title(
|
||||
else:
|
||||
template = DEFAULT_TITLE_GENERATION_PROMPT_TEMPLATE
|
||||
|
||||
messages = form_data["messages"]
|
||||
|
||||
# Remove reasoning details from the messages
|
||||
for message in messages:
|
||||
message["content"] = re.sub(
|
||||
r"<details\s+type=\"reasoning\"[^>]*>.*?<\/details>",
|
||||
"",
|
||||
message["content"],
|
||||
flags=re.S,
|
||||
).strip()
|
||||
|
||||
content = title_generation_template(
|
||||
template,
|
||||
messages,
|
||||
form_data["messages"],
|
||||
{
|
||||
"name": user.name,
|
||||
"location": user.info.get("location") if user.info else None,
|
||||
|
@ -978,7 +978,7 @@ async def process_chat_response(
|
||||
messages = get_message_list(message_map, message.get("id"))
|
||||
|
||||
# Remove reasoning details and files from the messages.
|
||||
# as get_message_list creates a new list, it does not affect
|
||||
# as get_message_list creates a new list, it does not affect
|
||||
# the original messages outside of this handler
|
||||
for message in messages:
|
||||
message["content"] = re.sub(
|
||||
@ -988,8 +988,8 @@ async def process_chat_response(
|
||||
flags=re.S,
|
||||
).strip()
|
||||
|
||||
if message.get('files'):
|
||||
message['files'] = []
|
||||
if message.get("files"):
|
||||
message["files"] = []
|
||||
|
||||
if tasks and messages:
|
||||
if TASKS.TITLE_GENERATION in tasks:
|
||||
|
Loading…
Reference in New Issue
Block a user