mirror of
https://github.com/open-webui/open-webui
synced 2025-06-14 10:20:52 +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:
|
else:
|
||||||
template = DEFAULT_TITLE_GENERATION_PROMPT_TEMPLATE
|
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(
|
content = title_generation_template(
|
||||||
template,
|
template,
|
||||||
messages,
|
form_data["messages"],
|
||||||
{
|
{
|
||||||
"name": user.name,
|
"name": user.name,
|
||||||
"location": user.info.get("location") if user.info else None,
|
"location": user.info.get("location") if user.info else None,
|
||||||
|
@ -988,8 +988,8 @@ async def process_chat_response(
|
|||||||
flags=re.S,
|
flags=re.S,
|
||||||
).strip()
|
).strip()
|
||||||
|
|
||||||
if message.get('files'):
|
if message.get("files"):
|
||||||
message['files'] = []
|
message["files"] = []
|
||||||
|
|
||||||
if tasks and messages:
|
if tasks and messages:
|
||||||
if TASKS.TITLE_GENERATION in tasks:
|
if TASKS.TITLE_GENERATION in tasks:
|
||||||
|
Loading…
Reference in New Issue
Block a user