mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-22 21:54:45 +08:00
15 lines
421 B
Python
15 lines
421 B
Python
|
|
from langchain.tools import BaseTool
|
||
|
|
|
||
|
|
from src.config import get_app_config
|
||
|
|
from src.reflection import resolve_variable
|
||
|
|
|
||
|
|
|
||
|
|
def get_available_tools(groups: list[str] | None = None) -> list[BaseTool]:
|
||
|
|
"""Get all available tools from config"""
|
||
|
|
config = get_app_config()
|
||
|
|
return [
|
||
|
|
resolve_variable(tool.use, BaseTool)
|
||
|
|
for tool in config.tools
|
||
|
|
if groups is None or tool.group in groups
|
||
|
|
]
|