fixed ollama cloud search filtering

This commit is contained in:
fluxik 2025-12-11 12:02:49 +03:00
parent 6f1486ffd0
commit 9d269537d7

View file

@ -4,7 +4,7 @@ from typing import Optional
import requests
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.setLevel(SRC_LOG_LEVELS["RAG"])
@ -38,6 +38,9 @@ def search_ollama_cloud(
results = data.get("results", [])
log.info(f"Found {len(results)} results")
if filter_list:
results = get_filtered_results(results, filter_list)
return [
SearchResult(
link=result.get("url", ""),