diff --git a/apps/scheduler/executor/agent.py b/apps/scheduler/executor/agent.py index 6e8a7b6a3a5283f89795c910f7a1ef1ba551051e..a3068d11c45bc52d44dd0263252b49d3e8bcb30e 100644 --- a/apps/scheduler/executor/agent.py +++ b/apps/scheduler/executor/agent.py @@ -71,21 +71,25 @@ class MCPAgentExecutor(BaseExecutor): ) resoning_llm: ReasoningLLM = Field( description="推理大模型", - default=ReasoningLLM() + default_factory=ReasoningLLM, + exclude=True ) function_call_llm: FunctionLLM = Field( description="函数调用大模型", - default=FunctionLLM() + default_factory=FunctionLLM, + exclude=True ) app_owner: str = Field(default="", description="应用所有者") auto_execute: bool | None = Field(default=None, description="是否自动执行(来自请求)") mcp_host: MCPHost = Field( description="MCP主机", - default=MCPHost() + default_factory=MCPHost, + exclude=True ) mcp_planner: MCPPlanner = Field( description="MCP规划器", - default=MCPPlanner() + default_factory=MCPPlanner, + exclude=True ) async def init_llms(self) -> None: diff --git a/apps/scheduler/executor/step.py b/apps/scheduler/executor/step.py index 04600e84064e39c7107008ffefaf63bc840b1606..525f9efc81eb69c07c53f80b91c38981007d87e6 100644 --- a/apps/scheduler/executor/step.py +++ b/apps/scheduler/executor/step.py @@ -6,10 +6,10 @@ import logging import uuid from collections.abc import AsyncGenerator from datetime import UTC, datetime -from typing import Any, Field +from typing import Any import json import jsonschema -from pydantic import ConfigDict +from pydantic import ConfigDict, Field from apps.scheduler.call.core import CoreCall from apps.scheduler.call.empty import Empty