mirror of
https://github.com/open-webui/open-webui
synced 2024-11-24 04:54:12 +00:00
format
This commit is contained in:
parent
6783c98539
commit
e1a85c99ab
@ -598,7 +598,9 @@ async def update_rag_config(form_data: ConfigUpdateForm, user=Depends(get_admin_
|
|||||||
app.state.config.BRAVE_SEARCH_API_KEY = (
|
app.state.config.BRAVE_SEARCH_API_KEY = (
|
||||||
form_data.web.search.brave_search_api_key
|
form_data.web.search.brave_search_api_key
|
||||||
)
|
)
|
||||||
app.state.config.MOJEEK_SEARCH_API_KEY = form_data.web.search.mojeek_search_api_key
|
app.state.config.MOJEEK_SEARCH_API_KEY = (
|
||||||
|
form_data.web.search.mojeek_search_api_key
|
||||||
|
)
|
||||||
app.state.config.SERPSTACK_API_KEY = form_data.web.search.serpstack_api_key
|
app.state.config.SERPSTACK_API_KEY = form_data.web.search.serpstack_api_key
|
||||||
app.state.config.SERPSTACK_HTTPS = form_data.web.search.serpstack_https
|
app.state.config.SERPSTACK_HTTPS = form_data.web.search.serpstack_https
|
||||||
app.state.config.SERPER_API_KEY = form_data.web.search.serper_api_key
|
app.state.config.SERPER_API_KEY = form_data.web.search.serper_api_key
|
||||||
|
@ -22,7 +22,7 @@ def search_mojeek(
|
|||||||
headers = {
|
headers = {
|
||||||
"Accept": "application/json",
|
"Accept": "application/json",
|
||||||
}
|
}
|
||||||
params = {"q": query, "api_key": api_key, 'fmt': 'json', 't': count}
|
params = {"q": query, "api_key": api_key, "fmt": "json", "t": count}
|
||||||
|
|
||||||
response = requests.get(url, headers=headers, params=params)
|
response = requests.get(url, headers=headers, params=params)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
@ -32,7 +32,6 @@ def search_mojeek(
|
|||||||
if filter_list:
|
if filter_list:
|
||||||
results = get_filtered_results(results, filter_list)
|
results = get_filtered_results(results, filter_list)
|
||||||
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
SearchResult(
|
SearchResult(
|
||||||
link=result["url"], title=result.get("title"), snippet=result.get("desc")
|
link=result["url"], title=result.get("title"), snippet=result.get("desc")
|
||||||
|
Loading…
Reference in New Issue
Block a user