refac
This commit is contained in:
@@ -3,6 +3,7 @@ from __future__ import annotations
|
||||
import logging
|
||||
|
||||
import requests
|
||||
from open_webui.env import TAVILY_API_BASE_URL
|
||||
from open_webui.retrieval.web.main import SearchResult, get_filtered_results
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@@ -25,7 +26,7 @@ def search_tavily(
|
||||
Returns:
|
||||
A list of SearchResult objects.
|
||||
"""
|
||||
url = 'https://api.tavily.com/search'
|
||||
url = f'{TAVILY_API_BASE_URL}/search'
|
||||
headers = {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': f'Bearer {api_key}',
|
||||
|
||||
Reference in New Issue
Block a user