This commit is contained in:
Timothy Jaeryang Baek committed 2026-07-31 17:41:14 -04:00
1 parent 3becec6ccf
commit bb0f898b43
45 files changed
+552 -552

No files matched your search

+2 -2
View File
@@ -1,9 +1,9 @@
from __future__ import annotations
import json
import logging
from open_webui.retrieval.web.main import SearchResult, get_filtered_results
from open_webui.utils.json_codec import JSONCodec
from open_webui.utils.session_pool import get_session
log = logging.getLogger(__name__)
@@ -23,7 +23,7 @@ async def search_serper(
headers = {'X-API-KEY': api_key, 'Content-Type': 'application/json'}
session = await get_session()
async with session.post(url, headers=headers, data=json.dumps({'q': query})) as response:
async with session.post(url, headers=headers, data=JSONCodec.dumps({'q': query})) as response:
response.raise_for_status()
payload = await response.json()