This commit is contained in:
Timothy J. Baek
2024-05-27 14:25:36 -07:00
parent f3527df644
commit 74a8deb19f
7 changed files with 84 additions and 249 deletions

View File

@@ -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 == "":

View File

@@ -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: