feat: support duckduckgo search engine

This commit is contained in:
He Tao
2025-04-10 11:45:04 +08:00
parent 03798ded08
commit 1195612c47
13 changed files with 88 additions and 119 deletions

View File

@@ -1,2 +1,15 @@
import os
import enum
from dotenv import load_dotenv
load_dotenv()
class SearchEngine(enum.Enum):
TAVILY = "tavily"
DUCKDUCKGO = "duckduckgo"
# Tool configuration
TAVILY_MAX_RESULTS = 3
SELECTED_SEARCH_ENGINE = os.getenv("SEARCH_API", SearchEngine.TAVILY.value)
SEARCH_MAX_RESULTS = 3