mirror of
https://github.com/open-webui/open-webui
synced 2025-03-21 04:18:56 +00:00
fix: tag search
This commit is contained in:
parent
effa77379e
commit
bc75870289
@ -396,12 +396,14 @@ class ChatTable:
|
||||
search_text_words = search_text.split(" ")
|
||||
|
||||
# search_text might contain 'tag:tag_name' format so we need to extract the tag_name, split the search_text and remove the tags
|
||||
tag_ids = []
|
||||
for word in search_text_words:
|
||||
if word.startswith("tag:"):
|
||||
tag_id = word[4:]
|
||||
tag_ids.append(tag_id)
|
||||
search_text_words.remove(word)
|
||||
tag_ids = [
|
||||
tag_name.replace("tag:", "").replace(" ", "_").lower()
|
||||
for tag_name in search_text_words
|
||||
if tag_name.startswith("tag:")
|
||||
]
|
||||
search_text_words = [
|
||||
word for word in search_text_words if not word.startswith("tag:")
|
||||
]
|
||||
|
||||
search_text = " ".join(search_text_words)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user