refac: ollama cloud web search count support

This commit is contained in:
Timothy Jaeryang Baek 2025-09-24 15:58:56 -05:00
parent 3d2f7e3143
commit fe65fe0b97
1 changed files with 2 additions and 4 deletions

View File

@ -26,11 +26,9 @@ def search_ollama_cloud(
filter_list (Optional[list[str]]): List of domains to filter results by filter_list (Optional[list[str]]): List of domains to filter results by
""" """
log.info(f"Searching with Ollama for query: {query}") log.info(f"Searching with Ollama for query: {query}")
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
payload = { headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
"query": query, payload = {"query": query, "max_results": count}
}
try: try:
response = requests.post(f"{url}/api/web_search", headers=headers, json=payload) response = requests.post(f"{url}/api/web_search", headers=headers, json=payload)