Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
9e870124
Unverified
Commit
9e870124
authored
Jun 19, 2024
by
Que Nguyen
Committed by
GitHub
Jun 19, 2024
Browse files
Fix: Rename 'whitelist' to 'filter_list' in function
parent
b6ad5393
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
backend/apps/rag/search/searxng.py
backend/apps/rag/search/searxng.py
+1
-1
No files found.
backend/apps/rag/search/searxng.py
View file @
9e870124
...
@@ -83,7 +83,7 @@ def search_searxng(
...
@@ -83,7 +83,7 @@ def search_searxng(
results
=
json_response
.
get
(
"results"
,
[])
results
=
json_response
.
get
(
"results"
,
[])
sorted_results
=
sorted
(
results
,
key
=
lambda
x
:
x
.
get
(
"score"
,
0
),
reverse
=
True
)
sorted_results
=
sorted
(
results
,
key
=
lambda
x
:
x
.
get
(
"score"
,
0
),
reverse
=
True
)
if
filter_list
:
if
filter_list
:
sorted_results
=
get_filtered_results
(
sorted_results
,
white
list
)
sorted_results
=
get_filtered_results
(
sorted_results
,
filter_
list
)
return
[
return
[
SearchResult
(
SearchResult
(
link
=
result
[
"url"
],
title
=
result
.
get
(
"title"
),
snippet
=
result
.
get
(
"content"
)
link
=
result
[
"url"
],
title
=
result
.
get
(
"title"
),
snippet
=
result
.
get
(
"content"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment