修复了联网插件的一个小问题,蒽,对🤤
This commit is contained in:
committed by
Windpicker-owo
parent
67074eba7e
commit
740c142d4f
@@ -40,6 +40,7 @@ from src.config.official_configs import (
|
|||||||
DependencyManagementConfig,
|
DependencyManagementConfig,
|
||||||
ExaConfig,
|
ExaConfig,
|
||||||
WebSearchConfig,
|
WebSearchConfig,
|
||||||
|
TavilyConfig,
|
||||||
)
|
)
|
||||||
|
|
||||||
from .api_ada_configs import (
|
from .api_ada_configs import (
|
||||||
@@ -373,6 +374,7 @@ class Config(ConfigBase):
|
|||||||
dependency_management: DependencyManagementConfig = field(default_factory=lambda: DependencyManagementConfig())
|
dependency_management: DependencyManagementConfig = field(default_factory=lambda: DependencyManagementConfig())
|
||||||
exa: ExaConfig = field(default_factory=lambda: ExaConfig())
|
exa: ExaConfig = field(default_factory=lambda: ExaConfig())
|
||||||
web_search: WebSearchConfig = field(default_factory=lambda: WebSearchConfig())
|
web_search: WebSearchConfig = field(default_factory=lambda: WebSearchConfig())
|
||||||
|
tavily: TavilyConfig = field(default_factory=lambda: TavilyConfig())
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
|||||||
@@ -998,8 +998,16 @@ class DependencyManagementConfig(ConfigBase):
|
|||||||
class ExaConfig(ConfigBase):
|
class ExaConfig(ConfigBase):
|
||||||
"""EXA搜索引擎配置类"""
|
"""EXA搜索引擎配置类"""
|
||||||
|
|
||||||
api_key: str = "None"
|
api_keys: list[str] = field(default_factory=lambda: [])
|
||||||
"""EXA API密钥,用于联网搜索功能。请填入有效的EXA API密钥"""
|
"""EXA API密钥列表,支持轮询机制"""
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class TavilyConfig(ConfigBase):
|
||||||
|
"""Tavily搜索引擎配置类"""
|
||||||
|
|
||||||
|
api_keys: list[str] = field(default_factory=lambda: [])
|
||||||
|
"""Tavily API密钥列表,支持轮询机制"""
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@@ -1044,6 +1052,12 @@ class WebSearchConfig(ConfigBase):
|
|||||||
|
|
||||||
enable_web_search_tool: bool = True
|
enable_web_search_tool: bool = True
|
||||||
"""是否启用联网搜索工具"""
|
"""是否启用联网搜索工具"""
|
||||||
|
|
||||||
enable_url_tool: bool = True
|
enable_url_tool: bool = True
|
||||||
"""是否启用URL解析工具"""
|
"""是否启用URL解析工具"""
|
||||||
|
|
||||||
|
enabled_engines: list[str] = field(default_factory=lambda: ["ddg"])
|
||||||
|
"""启用的搜索引擎列表,可选: 'exa', 'tavily', 'ddg'"""
|
||||||
|
|
||||||
|
search_strategy: str = "single"
|
||||||
|
"""搜索策略: 'single'(使用第一个可用引擎), 'parallel'(并行使用所有启用的引擎), 'fallback'(按顺序尝试,失败则尝试下一个)"""
|
||||||
Reference in New Issue
Block a user