From f4754dc129e68cc391b15d0f8dea4d52aece4f40 Mon Sep 17 00:00:00 2001 From: wundergeu <118638389+wundergeu@users.noreply.github.com> Date: Fri, 1 May 2026 12:54:11 +0200 Subject: [PATCH] Limits the search result snippet returned by exa search api Changed the request to only return a highlights snippet for each search result instead of the entire web page content. --- backend/open_webui/retrieval/web/exa.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/retrieval/web/exa.py b/backend/open_webui/retrieval/web/exa.py index 860917854e..e42df78b66 100644 --- a/backend/open_webui/retrieval/web/exa.py +++ b/backend/open_webui/retrieval/web/exa.py @@ -39,7 +39,7 @@ def search_exa( 'query': query, 'numResults': count or 5, 'includeDomains': filter_list, - 'contents': {'text': True, 'highlights': True}, + 'contents': {'highlights': {'max_characters': 600}}, 'type': 'auto', # Use the auto search type (keyword or neural) } @@ -54,7 +54,7 @@ def search_exa( ExaResult( url=result['url'], title=result['title'], - text=result['text'], + text=result['highlights'][0], ) )