mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-16 23:43:03 +00:00
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.
This commit is contained in:
parent
8dae237a0b
commit
f4754dc129
1 changed files with 2 additions and 2 deletions
|
|
@ -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],
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue