mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
修复格式
This commit is contained in:
@@ -82,7 +82,8 @@ class ProcessLLMRequest:
|
||||
# Encourage the model to delegate to subagents.
|
||||
# Use the built-in default router prompt; user overrides are disabled for now.
|
||||
router_prompt = (
|
||||
self.ctx.get_config().get("provider_settings", {})
|
||||
self.ctx.get_config()
|
||||
.get("provider_settings", {})
|
||||
.get("subagent_orchestrator", {})
|
||||
.get("router_system_prompt", "")
|
||||
).strip()
|
||||
|
||||
@@ -77,7 +77,9 @@ class FunctionToolExecutor(BaseFunctionToolExecutor[AstrAgentContext]):
|
||||
|
||||
# Use per-subagent provider override if configured; otherwise fall back
|
||||
# to the current/default provider resolution.
|
||||
prov_id = getattr(tool, "provider_id", None) or await ctx.get_current_chat_provider_id(umo)
|
||||
prov_id = getattr(
|
||||
tool, "provider_id", None
|
||||
) or await ctx.get_current_chat_provider_id(umo)
|
||||
llm_resp = await ctx.tool_loop_agent(
|
||||
event=event,
|
||||
chat_provider_id=prov_id,
|
||||
|
||||
@@ -121,7 +121,6 @@ DEFAULT_CONFIG = {
|
||||
"shipyard_ttl": 3600,
|
||||
"shipyard_max_sessions": 10,
|
||||
},
|
||||
|
||||
# SubAgent orchestrator mode: the main LLM only delegates tasks to subagents
|
||||
# (via transfer_to_{agent} tools). Domain tools are mounted on subagents.
|
||||
"subagent_orchestrator": {
|
||||
|
||||
@@ -41,7 +41,11 @@ class SubAgentRoute(Route):
|
||||
}
|
||||
|
||||
# Backward compatibility: older config used `enable`.
|
||||
if isinstance(data, dict) and "main_enable" not in data and "enable" in data:
|
||||
if (
|
||||
isinstance(data, dict)
|
||||
and "main_enable" not in data
|
||||
and "enable" in data
|
||||
):
|
||||
data["main_enable"] = bool(data.get("enable", False))
|
||||
|
||||
# Ensure required keys exist.
|
||||
|
||||
Reference in New Issue
Block a user