2025-04-07 16:25:55 +08:00
|
|
|
from .crawl import crawl_tool
|
|
|
|
|
from .python_repl import python_repl_tool
|
2025-04-11 15:37:55 +08:00
|
|
|
from .search import (
|
|
|
|
|
tavily_search_tool,
|
|
|
|
|
duckduckgo_search_tool,
|
|
|
|
|
brave_search_tool,
|
|
|
|
|
arxiv_search_tool,
|
|
|
|
|
)
|
2025-04-10 11:45:04 +08:00
|
|
|
from src.config import SELECTED_SEARCH_ENGINE, SearchEngine
|
|
|
|
|
|
|
|
|
|
# Map search engine names to their respective tools
|
|
|
|
|
search_tool_mappings = {
|
|
|
|
|
SearchEngine.TAVILY.value: tavily_search_tool,
|
|
|
|
|
SearchEngine.DUCKDUCKGO.value: duckduckgo_search_tool,
|
2025-04-11 15:37:55 +08:00
|
|
|
SearchEngine.BRAVE_SEARCH.value: brave_search_tool,
|
|
|
|
|
SearchEngine.ARXIV.value: arxiv_search_tool,
|
2025-04-10 11:45:04 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
web_search_tool = search_tool_mappings.get(SELECTED_SEARCH_ENGINE, tavily_search_tool)
|
2025-04-07 16:25:55 +08:00
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
|
"crawl_tool",
|
2025-04-10 11:45:04 +08:00
|
|
|
"web_search_tool",
|
2025-04-07 16:25:55 +08:00
|
|
|
"python_repl_tool",
|
|
|
|
|
]
|