mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac
This commit is contained in:
@@ -655,7 +655,7 @@ def store_web_search(form_data: SearchForm, user=Depends(get_current_user)):
|
||||
)
|
||||
urls = [result.link for result in web_results]
|
||||
loader = get_web_loader(urls)
|
||||
data = loader.aload()
|
||||
data = loader.load()
|
||||
|
||||
collection_name = form_data.collection_name
|
||||
if collection_name == "":
|
||||
|
||||
@@ -550,6 +550,8 @@ def search_web(query: str) -> list[SearchResult]:
|
||||
Args:
|
||||
query (str): The query to search for
|
||||
"""
|
||||
|
||||
# TODO: add playwright to search the web
|
||||
if SEARXNG_QUERY_URL:
|
||||
return search_searxng(SEARXNG_QUERY_URL, query)
|
||||
elif GOOGLE_PSE_API_KEY and GOOGLE_PSE_ENGINE_ID:
|
||||
|
||||
Reference in New Issue
Block a user