From a480aebcdc6825e42ae07615e27debff55e0862c Mon Sep 17 00:00:00 2001 From: zxstty Date: Tue, 19 Aug 2025 16:14:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=88=86=E6=94=AF=E8=8A=82?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/scheduler/call/choice/choice.py | 6 +++--- apps/scheduler/call/choice/condition_handler.py | 2 +- apps/scheduler/pool/loader/app.py | 1 - apps/schemas/mcp.py | 2 +- apps/services/appcenter.py | 1 - apps/services/parameter.py | 2 ++ 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/scheduler/call/choice/choice.py b/apps/scheduler/call/choice/choice.py index fb2c475a..2a645d96 100644 --- a/apps/scheduler/call/choice/choice.py +++ b/apps/scheduler/call/choice/choice.py @@ -80,7 +80,7 @@ class Choice(CoreCall, input_model=ChoiceInput, output_model=ChoiceOutput): logger.warning(f"[Choice] 分支 {choice.branch_id} 条件处理失败: {msg}") continue if not ConditionHandler.check_value_type( - condition.left.value, condition.left.type): + condition.left, condition.left.type): msg = f"左值类型不匹配: {condition.left.value} 应为 {condition.left.type.value}" logger.warning(f"[Choice] 分支 {choice.branch_id} 条件处理失败: {msg}") continue @@ -98,7 +98,7 @@ class Choice(CoreCall, input_model=ChoiceInput, output_model=ChoiceOutput): logger.warning(f"[Choice] 分支 {choice.branch_id} 条件处理失败: {msg}") continue if not ConditionHandler.check_value_type( - condition.right.value, condition.right.type): + condition.right, condition.right.type): msg = f"右值类型不匹配: {condition.right.value} 应为 {condition.right.type.value}" logger.warning(f"[Choice] 分支 {choice.branch_id} 条件处理失败: {msg}") continue @@ -119,7 +119,7 @@ class Choice(CoreCall, input_model=ChoiceInput, output_model=ChoiceOutput): else: condition.right.value = ast.literal_eval(condition.right.value) if not ConditionHandler.check_value_type( - condition.right.value, condition.right.type): + condition.right, condition.right.type): msg = f"右值类型不匹配: {condition.right.value} 应为 {condition.right.type.value}" logger.warning(f"[Choice] 分支 {choice.branch_id} 条件处理失败: {msg}") continue diff --git a/apps/scheduler/call/choice/condition_handler.py b/apps/scheduler/call/choice/condition_handler.py index 261809ad..f6362062 100644 --- a/apps/scheduler/call/choice/condition_handler.py +++ b/apps/scheduler/call/choice/condition_handler.py @@ -112,7 +112,7 @@ class ConditionHandler(BaseModel): left = condition.left operate = condition.operate right = condition.right - value_type = condition.type + value_type = left.type result = None if value_type == Type.STRING: diff --git a/apps/scheduler/pool/loader/app.py b/apps/scheduler/pool/loader/app.py index 49407ba9..aaca569d 100644 --- a/apps/scheduler/pool/loader/app.py +++ b/apps/scheduler/pool/loader/app.py @@ -78,7 +78,6 @@ class AppLoader: # 加载模型 try: metadata = AgentAppMetadata.model_validate(metadata) - logger.info(f"[AppLoader] Agent应用元数据验证成功: {metadata}") except Exception as e: err = "[AppLoader] Agent应用元数据验证失败" logger.exception(err) diff --git a/apps/schemas/mcp.py b/apps/schemas/mcp.py index af7086cd..b1f45c43 100644 --- a/apps/schemas/mcp.py +++ b/apps/schemas/mcp.py @@ -57,7 +57,7 @@ class MCPServerStdioConfig(MCPBasicConfig): class MCPServerSSEConfig(MCPBasicConfig): """MCP 服务器配置""" - url: str = Field(description="MCP 服务器地址", default="") + url: str = Field(description="MCP 服务器地址", default="http://example.com/sse", pattern=r"^https?://.+/sse$") class MCPServerConfig(BaseModel): diff --git a/apps/services/appcenter.py b/apps/services/appcenter.py index 4e0d00d0..15411623 100644 --- a/apps/services/appcenter.py +++ b/apps/services/appcenter.py @@ -83,7 +83,6 @@ class AppCenterManager: if app_type is not None: filters["app_type"] = app_type.value # 获取应用列表 - logger.error(f"[AppCenterManager] 搜索条件: {filters}, 页码: {page}, 每页大小: {SERVICE_PAGE_SIZE}") apps, total_apps = await AppCenterManager._search_apps_by_filter(filters, page, SERVICE_PAGE_SIZE) # 构建返回的应用卡片列表 diff --git a/apps/services/parameter.py b/apps/services/parameter.py index 2b85c62e..89f1ca85 100644 --- a/apps/services/parameter.py +++ b/apps/services/parameter.py @@ -75,6 +75,8 @@ class ParameterManager: pre_step_params = [] for i in range(1, len(q)): step_id = q[i] + if step_id == 'start' or step_id == 'end': + continue node_id = step_id_to_node_id.get(step_id) _, output_schema = await NodeManager.get_node_params(node_id) slot = Slot(output_schema) -- Gitee