mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 12:25:20 +00:00
Merge 9d269537d7 into 8e661a4e73
This commit is contained in:
commit
89c29d5579
1 changed files with 4 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ from typing import Optional
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from open_webui.env import SRC_LOG_LEVELS
|
from open_webui.env import SRC_LOG_LEVELS
|
||||||
from open_webui.retrieval.web.main import SearchResult
|
from open_webui.retrieval.web.main import SearchResult, get_filtered_results
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
log.setLevel(SRC_LOG_LEVELS["RAG"])
|
log.setLevel(SRC_LOG_LEVELS["RAG"])
|
||||||
|
|
@ -38,6 +38,9 @@ def search_ollama_cloud(
|
||||||
results = data.get("results", [])
|
results = data.get("results", [])
|
||||||
log.info(f"Found {len(results)} results")
|
log.info(f"Found {len(results)} results")
|
||||||
|
|
||||||
|
if filter_list:
|
||||||
|
results = get_filtered_results(results, filter_list)
|
||||||
|
|
||||||
return [
|
return [
|
||||||
SearchResult(
|
SearchResult(
|
||||||
link=result.get("url", ""),
|
link=result.get("url", ""),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue