mirror of
https://github.com/zebrajr/ollama-webui.git
synced 2026-01-15 12:15:13 +00:00
refac: ollama web
This commit is contained in:
@@ -3,7 +3,7 @@ from dataclasses import dataclass
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
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__)
|
||||||
|
|
||||||
@@ -36,6 +36,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", ""),
|
||||||
|
|||||||
Reference in New Issue
Block a user