mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-11 20:05:19 +00:00
fix: firecrawl import
This commit is contained in:
parent
67c4ea1e57
commit
c38f878e1e
1 changed files with 2 additions and 1 deletions
|
|
@ -4,7 +4,6 @@ from typing import Optional, List
|
||||||
from open_webui.retrieval.web.main import SearchResult, get_filtered_results
|
from open_webui.retrieval.web.main import SearchResult, get_filtered_results
|
||||||
from open_webui.env import SRC_LOG_LEVELS
|
from open_webui.env import SRC_LOG_LEVELS
|
||||||
|
|
||||||
from firecrawl import Firecrawl
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
log.setLevel(SRC_LOG_LEVELS["RAG"])
|
log.setLevel(SRC_LOG_LEVELS["RAG"])
|
||||||
|
|
@ -18,6 +17,8 @@ def search_firecrawl(
|
||||||
filter_list: Optional[List[str]] = None,
|
filter_list: Optional[List[str]] = None,
|
||||||
) -> List[SearchResult]:
|
) -> List[SearchResult]:
|
||||||
try:
|
try:
|
||||||
|
from firecrawl import Firecrawl
|
||||||
|
|
||||||
firecrawl = Firecrawl(api_key=firecrawl_api_key, api_url=firecrawl_url)
|
firecrawl = Firecrawl(api_key=firecrawl_api_key, api_url=firecrawl_url)
|
||||||
response = firecrawl.search(
|
response = firecrawl.search(
|
||||||
query=query, limit=count, ignore_invalid_urls=True, timeout=count * 3
|
query=query, limit=count, ignore_invalid_urls=True, timeout=count * 3
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue