Fix escape sequence usage in strings. Remove unneeded import of os

Rename /config API method to config to match it's purpose. UI is
anyway too generic, and not what it is doing
This commit is contained in:
Debanjum Singh Solanky
2022-08-03 14:00:30 +03:00
parent a4eb55dd00
commit 38df727ef4
3 changed files with 6 additions and 4 deletions

View File

@@ -32,7 +32,7 @@ class DateFilter:
return query, entries, embeddings
# remove date range filter from query
query = re.sub(f'\s+{self.date_regex}', ' ', query)
query = re.sub(rf'\s+{self.date_regex}', ' ', query)
query = re.sub(r'\s{2,}', ' ', query).strip() # remove multiple spaces
# find entries containing any dates that fall with date range specified in query