mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-12 03:42:08 +00:00
fix: merge plugin tools into builtin toolsets
This commit is contained in:
parent
d9f0875591
commit
0120d8f31e
2 changed files with 23 additions and 3 deletions
11
toolsets.py
11
toolsets.py
|
|
@ -521,13 +521,18 @@ def get_toolset(name: str) -> Optional[Dict[str, Any]]:
|
|||
None: If toolset not found
|
||||
"""
|
||||
toolset = TOOLSETS.get(name)
|
||||
if toolset:
|
||||
return toolset
|
||||
|
||||
try:
|
||||
from tools.registry import registry
|
||||
except Exception:
|
||||
return None
|
||||
return toolset if toolset else None
|
||||
|
||||
if toolset:
|
||||
merged_tools = sorted(
|
||||
set(toolset.get("tools", []))
|
||||
| set(registry.get_tool_names_for_toolset(name))
|
||||
)
|
||||
return {**toolset, "tools": merged_tools}
|
||||
|
||||
registry_toolset = name
|
||||
description = f"Plugin toolset: {name}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue