From fe65fe0b97ec5a8fff71592ff04a25c8e123d108 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Wed, 24 Sep 2025 15:58:56 -0500 Subject: [PATCH] refac: ollama cloud web search count support --- backend/open_webui/retrieval/web/ollama.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backend/open_webui/retrieval/web/ollama.py b/backend/open_webui/retrieval/web/ollama.py index aad0b93d0a..a199a14389 100644 --- a/backend/open_webui/retrieval/web/ollama.py +++ b/backend/open_webui/retrieval/web/ollama.py @@ -26,11 +26,9 @@ def search_ollama_cloud( filter_list (Optional[list[str]]): List of domains to filter results by """ log.info(f"Searching with Ollama for query: {query}") - headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"} - payload = { - "query": query, - } + headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"} + payload = {"query": query, "max_results": count} try: response = requests.post(f"{url}/api/web_search", headers=headers, json=payload)