From 9d8f700a38496ec7301a3df9fa7184b298147463 Mon Sep 17 00:00:00 2001 From: Welkin1027 Date: Tue, 13 Oct 2026 16:23:57 +0800 Subject: [PATCH 1/2] test(corpus): add ran-intelligent-backup-battery-endurance modify/create Signed-off-by: Welkin1027 --- .../sdk/core/model/StandardTemplates.java | 17 +- .../StandardTemplatesStringConstantsTest.java | 3 + .../input_case_from_data.json | 579 ++++++++++++++++++ .../input_case_from_text.json | 168 +++++ .../input_case_from_data.json | 578 +++++++++++++++++ .../input_case_from_text.json | 145 +++++ .../scenarios/en-US/scenarios.json | 6 + .../scenarios/zh-CN/scenarios.json | 6 + .../v1/en-US/slot.json | 56 ++ .../v1/zh-CN/slot.json | 56 ++ .../v1/en-US/template.md | 100 +++ .../v1/zh-CN/template.md | 100 +++ 12 files changed, 1812 insertions(+), 2 deletions(-) create mode 100644 a2a-t-corpus/src/test/java/net/openan/a2at/sdk/corpus/suites/task/resources/ran-intelligent-backup-battery-endurance-create/input_case_from_data.json create mode 100644 a2a-t-corpus/src/test/java/net/openan/a2at/sdk/corpus/suites/task/resources/ran-intelligent-backup-battery-endurance-create/input_case_from_text.json create mode 100644 a2a-t-corpus/src/test/java/net/openan/a2at/sdk/corpus/suites/task/resources/ran-intelligent-backup-battery-endurance-modify/input_case_from_data.json create mode 100644 a2a-t-corpus/src/test/java/net/openan/a2at/sdk/corpus/suites/task/resources/ran-intelligent-backup-battery-endurance-modify/input_case_from_text.json create mode 100644 a2a-t-resources/src/main/resources/prompt_resources/slots/Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1/en-US/slot.json create mode 100644 a2a-t-resources/src/main/resources/prompt_resources/slots/Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1/zh-CN/slot.json create mode 100644 a2a-t-resources/src/main/resources/prompt_resources/templates/Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1/en-US/template.md create mode 100644 a2a-t-resources/src/main/resources/prompt_resources/templates/Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1/zh-CN/template.md diff --git a/a2a-t-core/src/main/java/net/openan/a2at/sdk/core/model/StandardTemplates.java b/a2a-t-core/src/main/java/net/openan/a2at/sdk/core/model/StandardTemplates.java index 5f339850..37d0144b 100644 --- a/a2a-t-core/src/main/java/net/openan/a2at/sdk/core/model/StandardTemplates.java +++ b/a2a-t-core/src/main/java/net/openan/a2at/sdk/core/model/StandardTemplates.java @@ -56,6 +56,17 @@ private StandardTemplates() { /** Raw template URI of {@link #PRIVATE_LINE_COMPLAINT}: {@code Task-T/network-layer/private-line-complaint/v1}. */ public static final String PRIVATE_LINE_COMPLAINT_URI = PRIVATE_LINE_COMPLAINT.uri(); + /** Task-T template for the ran-intelligent-backup-battery-endurance scenario. */ + public static final TemplateUri RAN_INTELLIGENT_BACKUP_BATTERY_ENDURANCE = + TemplateUri.of(TASK_EXTENSION_NAME, NETWORK_LAYER_SEGMENT, "ran-intelligent-backup-battery-endurance"); + + /** + * Raw template URI of {@link #RAN_INTELLIGENT_BACKUP_BATTERY_ENDURANCE}: + * {@code Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1}. + */ + public static final String RAN_INTELLIGENT_BACKUP_BATTERY_ENDURANCE_URI = + RAN_INTELLIGENT_BACKUP_BATTERY_ENDURANCE.uri(); + /** Notification-T template for the subscribe-incident scenario. */ public static final TemplateUri SUBSCRIBE_INCIDENT = TemplateUri.of(NOTIFICATION_EXTENSION_NAME, NETWORK_LAYER_SEGMENT, "subscribe-incident"); @@ -147,10 +158,12 @@ private StandardTemplates() { public static final String NEGOTIATION_ABORT_URI = NEGOTIATION_ABORT.uri(); /** All built-in Task-T templates. */ - public static final List TASK = List.of(ENERGY_SAVING, PRIVATE_LINE_COMPLAINT); + public static final List TASK = List.of( + ENERGY_SAVING, PRIVATE_LINE_COMPLAINT, RAN_INTELLIGENT_BACKUP_BATTERY_ENDURANCE); /** Raw template URIs of all built-in Task-T templates. */ - public static final List TASK_URIS = List.of(ENERGY_SAVING_URI, PRIVATE_LINE_COMPLAINT_URI); + public static final List TASK_URIS = List.of( + ENERGY_SAVING_URI, PRIVATE_LINE_COMPLAINT_URI, RAN_INTELLIGENT_BACKUP_BATTERY_ENDURANCE_URI); /** All built-in Notification-T templates. */ public static final List NOTIFICATION = List.of(SUBSCRIBE_INCIDENT, SERVICE_RECOVERY); diff --git a/a2a-t-core/src/test/java/net/openan/a2at/sdk/core/model/StandardTemplatesStringConstantsTest.java b/a2a-t-core/src/test/java/net/openan/a2at/sdk/core/model/StandardTemplatesStringConstantsTest.java index c9629494..e11ed1a2 100644 --- a/a2a-t-core/src/test/java/net/openan/a2at/sdk/core/model/StandardTemplatesStringConstantsTest.java +++ b/a2a-t-core/src/test/java/net/openan/a2at/sdk/core/model/StandardTemplatesStringConstantsTest.java @@ -21,6 +21,9 @@ class StandardTemplatesStringConstantsTest { void should_keepTypedAndStringConstantsInLockstep() { assertEquals(StandardTemplates.ENERGY_SAVING.uri(), StandardTemplates.ENERGY_SAVING_URI); assertEquals(StandardTemplates.PRIVATE_LINE_COMPLAINT.uri(), StandardTemplates.PRIVATE_LINE_COMPLAINT_URI); + assertEquals( + StandardTemplates.RAN_INTELLIGENT_BACKUP_BATTERY_ENDURANCE.uri(), + StandardTemplates.RAN_INTELLIGENT_BACKUP_BATTERY_ENDURANCE_URI); assertEquals(StandardTemplates.SUBSCRIBE_INCIDENT.uri(), StandardTemplates.SUBSCRIBE_INCIDENT_URI); assertEquals(StandardTemplates.SERVICE_RECOVERY.uri(), StandardTemplates.SERVICE_RECOVERY_URI); assertEquals( diff --git a/a2a-t-corpus/src/test/java/net/openan/a2at/sdk/corpus/suites/task/resources/ran-intelligent-backup-battery-endurance-create/input_case_from_data.json b/a2a-t-corpus/src/test/java/net/openan/a2at/sdk/corpus/suites/task/resources/ran-intelligent-backup-battery-endurance-create/input_case_from_data.json new file mode 100644 index 00000000..b5c1d024 --- /dev/null +++ b/a2a-t-corpus/src/test/java/net/openan/a2at/sdk/corpus/suites/task/resources/ran-intelligent-backup-battery-endurance-create/input_case_from_data.json @@ -0,0 +1,579 @@ +[ + { + "id": "TC00000001", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "data创建档-结构化完整(单站点+续航目标+小区列表)", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "create", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "创建新的分级下电任务,备电保障的续航时长目标:4h", + "task_object": "站点龙岩新罗水晶澜庭-HRHH,小区460-00-2136088-511重保4G 2.3GHz,小区460-00-2136088-512重保4G 2.3GHz,小区460-00-2136088-513关键4G 2.3GHz" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type of the wireless backup power task; allowed values are listed in the enum", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description for the wireless intelligent backup power management task" }, + "task_target": { "type": "string", "description": "Task target; one of: Create New Tiered Power-Down Task, Create Restoration Task, Modify Tiered Power-Down Task." }, + "task_object": { "type": "string", "description": "Task object; list of sites with their cells" }, + "task_context": { "type": "string", "description": "Task context information" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type of the wireless backup power task; allowed values are listed in the enum", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description for the wireless intelligent backup power management task" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context information" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { "$fromStep": 1, "$field": "promptText" } + } + } + ], + "expected": [ + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } }, + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } } + ] + }, + { + "id": "TC00000002", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "data创建档-多站点+混合制式+多保障等级", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "create", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "创建新的分级下电任务,备电保障的续航时长目标:4h", + "task_object": "站点龙岩新罗水晶澜庭-HRHH,小区460-00-2136088-511重保4G 2.3GHz,小区460-00-2136088-513关键4G 2.3GHz;站点龙岩新罗龙辉小区-HRHH,小区460-00-2134161-514关键5G 2.6GHz,小区460-00-2134161-515一般5G 2.6GHz" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { "$fromStep": 1, "$field": "promptText" } + } + } + ], + "expected": [ + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } }, + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } } + ] + }, + { + "id": "TC00000003", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "data创建档-创建恢复任务(回退配置)", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "create", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "创建恢复任务,回退无线智能备电配置", + "task_object": "站点龙岩新罗水晶澜庭-HRHH" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { "$fromStep": 1, "$field": "promptText" } + } + } + ], + "expected": [ + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } }, + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } } + ] + }, + { + "id": "TC00000004", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "data创建档-仅站点名称(无小区列表,选填放行)", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "create", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "创建新的分级下电任务,备电保障的续航时长目标:8h", + "task_object": "站点龙岩新罗水晶澜庭-HRHH" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { "$fromStep": 1, "$field": "promptText" } + } + } + ], + "expected": [ + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } }, + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } } + ] + }, + { + "id": "TC00000005", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "data创建档-5G制式站点+长续航目标12h", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "create", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "创建新的分级下电任务,备电保障的续航时长目标:12h", + "task_object": "站点龙岩新罗龙辉小区-HRHH,小区460-00-2134161-514关键5G 2.6GHz,小区460-00-2134161-515一般5G 2.6GHz,小区460-00-2134161-516一般5G 2.6GHz" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { "$fromStep": 1, "$field": "promptText" } + } + } + ], + "expected": [ + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } }, + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } } + ] + }, + { + "id": "TC00000006", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "data创建档-带任务上下文(背景事件信息)", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "create", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "创建新的分级下电任务,备电保障的续航时长目标:6h", + "task_object": "站点龙岩新罗水晶澜庭-HRHH,小区460-00-2136088-511重保4G 2.3GHz,小区460-00-2136088-513关键4G 2.3GHz", + "task_context": "市电停电,预计恢复时间6小时,需要保障重保小区不断电" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { "$fromStep": 1, "$field": "promptText" } + } + } + ], + "expected": [ + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } }, + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } } + ] + }, + { + "id": "TC00000007", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "data创建档-多站点+全部保障等级(重保+关键+一般)", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "create", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "创建新的分级下电任务,备电保障的续航时长目标:4h", + "task_object": "站点龙岩新罗水晶澜庭-HRHH,小区460-00-2136088-511重保4G 2.3GHz,小区460-00-2136088-512重保4G 2.3GHz,小区460-00-2136088-513关键4G 2.3GHz;站点龙岩新罗龙辉小区-HRHH,小区460-00-2134161-514关键5G 2.6GHz,小区460-00-2134161-515一般5G 2.6GHz,小区460-00-2134161-516一般5G 2.6GHz" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { "$fromStep": 1, "$field": "promptText" } + } + } + ], + "expected": [ + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } }, + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } } + ] + }, + { + "id": "TC00000008", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "data创建档-含用户指标信息(常住用户+RRC用户+流量+话务)", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "create", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "创建新的分级下电任务,备电保障的续航时长目标:4h", + "task_object": "站点龙岩新罗水晶澜庭-HRHH,小区460-00-2136088-511重保4G 2.3GHz,常住用户326户,当前RRC用户216户,流量12.6GB,话务72Erl;小区460-00-2136088-513关键4G 2.3GHz,常住用户150户,当前RRC用户80户,流量5.2GB,话务30Erl" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { "$fromStep": 1, "$field": "promptText" } + } + } + ], + "expected": [ + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } }, + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } } + ] + }, + { + "id": "TC00000009", + "caseDimension": "04-关键信息缺失", + "caseDesc": "data创建缺少任务描述,required应拦截", + "caseCategory": "异常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "create", + "task_target": "创建新的分级下电任务,备电保障的续航时长目标:4h", + "task_object": "站点龙岩新罗水晶澜庭-HRHH" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + } + ], + "expected": [ + { "result": "error", "data": {}, "error": { "errCode": "slot.not_provided", "errMessage": "" } } + ] + }, + { + "id": "TC00000010", + "caseDimension": "04-关键信息缺失", + "caseDesc": "data创建缺少操作类型,LLM从task_target推断补值", + "caseCategory": "边界", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "创建新的分级下电任务,备电保障的续航时长目标:4h", + "task_object": "站点龙岩新罗水晶澜庭-HRHH" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + } + ], + "expected": [ + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } } + ] + }, + { + "id": "TC00000011", + "caseDimension": "06-值域违规检测", + "caseDesc": "data创建操作类型\"delete\"违规", + "caseCategory": "异常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "delete", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "创建新的分级下电任务,备电保障的续航时长目标:4h" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + } + ], + "expected": [ + { "result": "error", "data": {}, "error": { "errCode": "slot.constraint_violated", "errMessage": "" } } + ] + }, + { + "id": "TC00000012", + "caseDimension": "06-值域违规检测", + "caseDesc": "data创建操作类型\"export\"违规", + "caseCategory": "异常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "export", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "创建新的分级下电任务,备电保障的续航时长目标:4h" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + } + ], + "expected": [ + { "result": "error", "data": {}, "error": { "errCode": "slot.constraint_violated", "errMessage": "" } } + ] + } +] diff --git a/a2a-t-corpus/src/test/java/net/openan/a2at/sdk/corpus/suites/task/resources/ran-intelligent-backup-battery-endurance-create/input_case_from_text.json b/a2a-t-corpus/src/test/java/net/openan/a2at/sdk/corpus/suites/task/resources/ran-intelligent-backup-battery-endurance-create/input_case_from_text.json new file mode 100644 index 00000000..b1aa155b --- /dev/null +++ b/a2a-t-corpus/src/test/java/net/openan/a2at/sdk/corpus/suites/task/resources/ran-intelligent-backup-battery-endurance-create/input_case_from_text.json @@ -0,0 +1,168 @@ +[ + { + "id": "TC00000001", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "创建档-标准创建诉求(站点+续航目标+小区列表)", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromText", + "args": { + "text": "创建无线智能备电任务:站点龙岩新罗水晶澜庭-HRHH,备电保障的续航时长目标4h,小区460-00-2136088-511重保4G 2.3GHz,小区460-00-2136088-512重保4G 2.3GHz,小区460-00-2136088-513关键4G 2.3GHz", + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { + "type": "string", + "description": "Operation type of the wireless backup power task; allowed values are listed in the enum", + "enum": ["create", "modify"] + }, + "task_description": { + "type": "string", + "description": "Task description for the wireless intelligent backup power management task" + }, + "task_target": { + "type": "string", + "description": "Task target; one of: Create New Tiered Power-Down Task, Create Restoration Task, Modify Tiered Power-Down Task. When creating or modifying a tiered power-down task, the backup power endurance duration target must be provided." + }, + "task_object": { + "type": "string", + "description": "Task object; list of sites with their cells, including CGI, protection level, frequency band, technology, resident users, RRC users, traffic, and voice traffic" + }, + "task_context": { + "type": "string", + "description": "Task context information" + }, + "expected_output": { + "type": "string", + "description": "Expected output; for tiered power-down tasks: execution result, non-shutdown cell list, and shutdown cell list; for restoration tasks: execution result, no-rollback cell list, and rollback cell list" + } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { + "$fromStep": 1, + "$field": "promptText" + } + } + } + ], + "expected": [ + { + "result": "success", + "data": {}, + "error": { "errCode": "", "errMessage": "" } + }, + { + "result": "success", + "data": { + "operation_type": "create", + "task_target": "Create New Tiered Power-Down Task, backup power endurance duration target: 4h", + "task_object": "龙岩新罗水晶澜庭-HRHH: 460-00-2136088-511: Critical Protection, 4G, 2.3GHz; 460-00-2136088-512: Critical Protection, 4G, 2.3GHz; 460-00-2136088-513: Key, 4G, 2.3GHz" + }, + "error": { "errCode": "", "errMessage": "" } + } + ] + }, + { + "id": "TC00000002", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "创建档-多站点+混合制式+多保障等级", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromText", + "args": { + "text": "创建无线智能备电任务:站点龙岩新罗水晶澜庭-HRHH,备电保障的续航时长目标4h,小区460-00-2136088-511重保4G 2.3GHz,小区460-00-2136088-513关键4G 2.3GHz;站点龙岩新罗龙辉小区-HRHH,小区460-00-2134161-514关键5G 2.6GHz,小区460-00-2134161-515一般5G 2.6GHz", + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { + "type": "string", + "description": "Operation type of the wireless backup power task; allowed values are listed in the enum", + "enum": ["create", "modify"] + }, + "task_description": { + "type": "string", + "description": "Task description for the wireless intelligent backup power management task" + }, + "task_target": { + "type": "string", + "description": "Task target; one of: Create New Tiered Power-Down Task, Create Restoration Task, Modify Tiered Power-Down Task." + }, + "task_object": { + "type": "string", + "description": "Task object; list of sites with their cells" + }, + "task_context": { + "type": "string", + "description": "Task context information" + }, + "expected_output": { + "type": "string", + "description": "Expected output" + } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { + "$fromStep": 1, + "$field": "promptText" + } + } + } + ], + "expected": [ + { + "result": "success", + "data": {}, + "error": { "errCode": "", "errMessage": "" } + }, + { + "result": "success", + "data": { + "operation_type": "create", + "task_target": "Create New Tiered Power-Down Task, backup power endurance duration target: 4h", + "task_object": "龙岩新罗水晶澜庭-HRHH: 460-00-2136088-511: Critical Protection, 4G, 2.3GHz; 460-00-2136088-513: Key, 4G, 2.3GHz; 龙岩新罗龙辉小区-HRHH: 460-00-2134161-514: Key, 5G, 2.6GHz; 460-00-2134161-515: General, 5G, 2.6GHz" + }, + "error": { "errCode": "", "errMessage": "" } + } + ] + }, + { + "id": "TC00000003", + "caseDimension": "04-关键信息缺失", + "caseDesc": "创建诉求缺少站点信息,required应拦截", + "caseCategory": "异常", + "input": [ + { + "api": "generateTaskPromptFromText", + "args": { + "text": "创建无线智能备电任务:备电保障的续航时长目标4h", + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + } + ], + "expected": [ + { + "result": "error", + "data": {}, + "error": { "errCode": "slot.not_provided", "errMessage": "" } + } + ] + } +] diff --git a/a2a-t-corpus/src/test/java/net/openan/a2at/sdk/corpus/suites/task/resources/ran-intelligent-backup-battery-endurance-modify/input_case_from_data.json b/a2a-t-corpus/src/test/java/net/openan/a2at/sdk/corpus/suites/task/resources/ran-intelligent-backup-battery-endurance-modify/input_case_from_data.json new file mode 100644 index 00000000..2c4a49be --- /dev/null +++ b/a2a-t-corpus/src/test/java/net/openan/a2at/sdk/corpus/suites/task/resources/ran-intelligent-backup-battery-endurance-modify/input_case_from_data.json @@ -0,0 +1,578 @@ +[ + { + "id": "TC00000001", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "data修改档-结构化完整(站点+续航目标+小区列表)", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "modify", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "修改分级下电任务,备电保障的续航时长目标:6h", + "task_object": "站点龙岩新罗水晶澜庭-HRHH,小区460-00-2136088-511重保4G 2.3GHz,小区460-00-2136088-513关键4G 2.3GHz" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { "$fromStep": 1, "$field": "promptText" } + } + } + ], + "expected": [ + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } }, + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } } + ] + }, + { + "id": "TC00000002", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "data修改档-多站点+混合制式+调整续航目标", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "modify", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "修改分级下电任务,备电保障的续航时长目标:8h", + "task_object": "站点龙岩新罗水晶澜庭-HRHH,小区460-00-2136088-511重保4G 2.3GHz;站点龙岩新罗龙辉小区-HRHH,小区460-00-2134161-514关键5G 2.6GHz,小区460-00-2134161-515一般5G 2.6GHz" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { "$fromStep": 1, "$field": "promptText" } + } + } + ], + "expected": [ + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } }, + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } } + ] + }, + { + "id": "TC00000003", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "data修改档-创建恢复任务(回退已有分级下电配置)", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "create", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "创建恢复任务,回退无线智能备电配置", + "task_object": "站点龙岩新罗水晶澜庭-HRHH" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { "$fromStep": 1, "$field": "promptText" } + } + } + ], + "expected": [ + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } }, + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } } + ] + }, + { + "id": "TC00000004", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "data修改档-仅站点名称(无小区列表,选填放行)", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "modify", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "修改分级下电任务,备电保障的续航时长目标:2h", + "task_object": "站点龙岩新罗水晶澜庭-HRHH" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { "$fromStep": 1, "$field": "promptText" } + } + } + ], + "expected": [ + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } }, + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } } + ] + }, + { + "id": "TC00000005", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "data修改档-带任务上下文(市电恢复,缩短续航目标)", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "modify", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "修改分级下电任务,备电保障的续航时长目标:2h", + "task_object": "站点龙岩新罗水晶澜庭-HRHH,小区460-00-2136088-511重保4G 2.3GHz,小区460-00-2136088-513关键4G 2.3GHz", + "task_context": "市电预计2小时后恢复,缩短备电保障时长" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { "$fromStep": 1, "$field": "promptText" } + } + } + ], + "expected": [ + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } }, + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } } + ] + }, + { + "id": "TC00000006", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "data修改档-5G站点+修改续航目标至12h", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "modify", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "修改分级下电任务,备电保障的续航时长目标:12h", + "task_object": "站点龙岩新罗龙辉小区-HRHH,小区460-00-2134161-514关键5G 2.6GHz,小区460-00-2134161-515一般5G 2.6GHz,小区460-00-2134161-516一般5G 2.6GHz" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { "$fromStep": 1, "$field": "promptText" } + } + } + ], + "expected": [ + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } }, + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } } + ] + }, + { + "id": "TC00000007", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "data修改档-含用户指标信息(常住用户+RRC用户+流量+话务)", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "modify", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "修改分级下电任务,备电保障的续航时长目标:4h", + "task_object": "站点龙岩新罗水晶澜庭-HRHH,小区460-00-2136088-511重保4G 2.3GHz,常住用户326户,当前RRC用户216户,流量12.6GB,话务72Erl;小区460-00-2136088-513关键4G 2.3GHz,常住用户150户,当前RRC用户80户,流量5.2GB,话务30Erl" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { "$fromStep": 1, "$field": "promptText" } + } + } + ], + "expected": [ + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } }, + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } } + ] + }, + { + "id": "TC00000008", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "data修改档-多站点恢复任务(多站点回退配置)", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "create", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "创建恢复任务,回退无线智能备电配置", + "task_object": "站点龙岩新罗水晶澜庭-HRHH;站点龙岩新罗龙辉小区-HRHH" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { "$fromStep": 1, "$field": "promptText" } + } + } + ], + "expected": [ + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } }, + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } } + ] + }, + { + "id": "TC00000009", + "caseDimension": "04-关键信息缺失", + "caseDesc": "data修改缺少任务描述,required应拦截", + "caseCategory": "异常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "modify", + "task_target": "修改分级下电任务,备电保障的续航时长目标:6h", + "task_object": "站点龙岩新罗水晶澜庭-HRHH" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + } + ], + "expected": [ + { "result": "error", "data": {}, "error": { "errCode": "slot.not_provided", "errMessage": "" } } + ] + }, + { + "id": "TC00000010", + "caseDimension": "04-关键信息缺失", + "caseDesc": "data修改缺少操作类型,LLM从task_target推断补值", + "caseCategory": "边界", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "修改分级下电任务,备电保障的续航时长目标:6h" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + } + ], + "expected": [ + { "result": "success", "data": {}, "error": { "errCode": "", "errMessage": "" } } + ] + }, + { + "id": "TC00000011", + "caseDimension": "06-值域违规检测", + "caseDesc": "data修改操作类型\"query\"违规", + "caseCategory": "异常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "query", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "修改分级下电任务,备电保障的续航时长目标:6h" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + } + ], + "expected": [ + { "result": "error", "data": {}, "error": { "errCode": "slot.not_provided", "errMessage": "" } } + ] + }, + { + "id": "TC00000012", + "caseDimension": "06-值域违规检测", + "caseDesc": "data修改操作类型\"rollback\"违规", + "caseCategory": "异常", + "input": [ + { + "api": "generateTaskPromptFromDataWithSchema", + "args": { + "data": { + "operation_type": "rollback", + "task_description": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果", + "task_target": "修改分级下电任务,备电保障的续航时长目标:6h" + }, + "schema": { + "type": "object", + "properties": { + "operation_type": { "type": "string", "description": "Operation type", "enum": ["create", "modify", "创建", "修改"] }, + "task_description": { "type": "string", "description": "Task description" }, + "task_target": { "type": "string", "description": "Task target" }, + "task_object": { "type": "string", "description": "Task object" }, + "task_context": { "type": "string", "description": "Task context" }, + "expected_output": { "type": "string", "description": "Expected output" } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + } + ], + "expected": [ + { "result": "error", "data": {}, "error": { "errCode": "slot.constraint_violated", "errMessage": "" } } + ] + } +] diff --git a/a2a-t-corpus/src/test/java/net/openan/a2at/sdk/corpus/suites/task/resources/ran-intelligent-backup-battery-endurance-modify/input_case_from_text.json b/a2a-t-corpus/src/test/java/net/openan/a2at/sdk/corpus/suites/task/resources/ran-intelligent-backup-battery-endurance-modify/input_case_from_text.json new file mode 100644 index 00000000..9392c107 --- /dev/null +++ b/a2a-t-corpus/src/test/java/net/openan/a2at/sdk/corpus/suites/task/resources/ran-intelligent-backup-battery-endurance-modify/input_case_from_text.json @@ -0,0 +1,145 @@ +[ + { + "id": "TC00000001", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "修改档-标准修改诉求(站点+续航目标+小区列表)", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromText", + "args": { + "text": "把无线智能备电任务调整为修改:站点龙岩新罗水晶澜庭-HRHH,备电保障的续航时长目标6h,小区460-00-2136088-511重保4G 2.3GHz,小区460-00-2136088-513关键4G 2.3GHz", + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { + "type": "string", + "description": "Operation type of the wireless backup power task; allowed values are listed in the enum", + "enum": ["create", "modify"] + }, + "task_description": { + "type": "string", + "description": "Task description for the wireless intelligent backup power management task" + }, + "task_target": { + "type": "string", + "description": "Task target; one of: Create New Tiered Power-Down Task, Create Restoration Task, Modify Tiered Power-Down Task." + }, + "task_object": { + "type": "string", + "description": "Task object; list of sites with their cells" + }, + "task_context": { + "type": "string", + "description": "Task context information" + }, + "expected_output": { + "type": "string", + "description": "Expected output" + } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { + "$fromStep": 1, + "$field": "promptText" + } + } + } + ], + "expected": [ + { + "result": "success", + "data": {}, + "error": { "errCode": "", "errMessage": "" } + }, + { + "result": "success", + "data": { + "operation_type": "modify", + "task_target": "Modify Tiered Power-Down Task, backup power endurance duration target: 6h", + "task_object": "龙岩新罗水晶澜庭-HRHH: 460-00-2136088-511: Critical Protection, 4G, 2.3GHz; 460-00-2136088-513: Key, 4G, 2.3GHz" + }, + "error": { "errCode": "", "errMessage": "" } + } + ] + }, + { + "id": "TC00000002", + "caseDimension": "01-意图清晰参数完整", + "caseDesc": "修改档-创建恢复任务(回退配置)", + "caseCategory": "正常", + "input": [ + { + "api": "generateTaskPromptFromText", + "args": { + "text": "创建恢复任务:回退无线智能备电配置,站点龙岩新罗水晶澜庭-HRHH", + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1" + } + }, + { + "api": "validateTaskPromptAndDataFilling", + "args": { + "schema": { + "type": "object", + "properties": { + "operation_type": { + "type": "string", + "description": "Operation type of the wireless backup power task; allowed values are listed in the enum", + "enum": ["create", "modify"] + }, + "task_description": { + "type": "string", + "description": "Task description for the wireless intelligent backup power management task" + }, + "task_target": { + "type": "string", + "description": "Task target; one of: Create New Tiered Power-Down Task, Create Restoration Task, Modify Tiered Power-Down Task." + }, + "task_object": { + "type": "string", + "description": "Task object; list of sites with their cells" + }, + "task_context": { + "type": "string", + "description": "Task context information" + }, + "expected_output": { + "type": "string", + "description": "Expected output" + } + }, + "required": ["operation_type", "task_description"] + }, + "templateUri": "Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1", + "promptText": { + "$fromStep": 1, + "$field": "promptText" + } + } + } + ], + "expected": [ + { + "result": "success", + "data": {}, + "error": { "errCode": "", "errMessage": "" } + }, + { + "result": "success", + "data": { + "operation_type": "create", + "task_target": "Create Restoration Task" + }, + "error": { "errCode": "", "errMessage": "" } + } + ] + } +] diff --git a/a2a-t-resources/src/main/resources/prompt_resources/scenarios/en-US/scenarios.json b/a2a-t-resources/src/main/resources/prompt_resources/scenarios/en-US/scenarios.json index 178f8f93..55937478 100644 --- a/a2a-t-resources/src/main/resources/prompt_resources/scenarios/en-US/scenarios.json +++ b/a2a-t-resources/src/main/resources/prompt_resources/scenarios/en-US/scenarios.json @@ -23,6 +23,12 @@ "scenario_name": "Service Recovery Event Subscription", "description": "Used to generate an A2A-T task request for subscribing to service recovery events in a telecom network management system, describing the subscription condition and the notification data format for network-side service recovery events.", "example": "Help me subscribe to service recovery events: only for the xx subnetwork, and report the recovery plan execution status, diagnosis sequence number, access port, and execution result in each event." + }, + { + "scenario_code": "ran-intelligent-backup-battery-endurance", + "scenario_name": "Wireless Intelligent Backup Power Management", + "description": "Used to generate an A2A-T task request for wireless intelligent backup power management in a telecom network management system, covering tiered power-down, backup power endurance duration targets, and restoration tasks.", + "example": "Create a wireless intelligent backup power task: site Longyan Xinluo Crystal Lanting-HRHH, backup power endurance duration target 4h, cell 460-00-2136088-511 Critical Protection, cell 460-00-2136088-513 Key." } ] } diff --git a/a2a-t-resources/src/main/resources/prompt_resources/scenarios/zh-CN/scenarios.json b/a2a-t-resources/src/main/resources/prompt_resources/scenarios/zh-CN/scenarios.json index bccf593a..59c32fc9 100644 --- a/a2a-t-resources/src/main/resources/prompt_resources/scenarios/zh-CN/scenarios.json +++ b/a2a-t-resources/src/main/resources/prompt_resources/scenarios/zh-CN/scenarios.json @@ -23,6 +23,12 @@ "scenario_name": "业务抢通事件订阅", "description": "用于生成电信网管系统中业务抢通事件订阅类的 A2A-T 任务请求,围绕网络侧业务抢通事件的订阅条件与上报通知数据格式进行描述。", "example": "帮我订阅业务抢通事件:只看xx子网,事件上报时带上抢通方案执行状态、诊断任务流水号、接入端口和执行结果这些信息。" + }, + { + "scenario_code": "ran-intelligent-backup-battery-endurance", + "scenario_name": "无线智能备电管理", + "description": "用于生成电信网管系统中无线智能备电管理类 A2A-T 任务请求,围绕基站分级下电、备电保障续航时长目标和恢复任务进行描述。", + "example": "创建无线智能备电任务:站点龙岩新罗水晶澜庭-HRHH,备电保障的续航时长目标4h,小区460-00-2136088-511重保,小区460-00-2136088-513关键。" } ] } diff --git a/a2a-t-resources/src/main/resources/prompt_resources/slots/Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1/en-US/slot.json b/a2a-t-resources/src/main/resources/prompt_resources/slots/Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1/en-US/slot.json new file mode 100644 index 00000000..bf8c34a3 --- /dev/null +++ b/a2a-t-resources/src/main/resources/prompt_resources/slots/Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1/en-US/slot.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "additionalProperties": false, + "properties": { + "operation_type": { + "type": "string", + "description": "Please provide the operation type. Allowed values: Create, Modify.", + "examples": [ + "Create" + ], + "x-a2at-value-constraint": "Allowed values: Create, Modify" + }, + "task_description": { + "type": "string", + "description": "Based on Task Object and Task Context, perform wireless intelligent backup power management to achieve the backup power target defined in Task Target, and return the task processing result according to the structure defined in Expected Output.", + "examples": [ + "Based on and , perform wireless intelligent backup power management to achieve the backup power target defined in , and return the task processing result according to the structure defined in ." + ], + "x-a2at-value-constraint": "Based on and , perform wireless intelligent backup power management to achieve the backup power target defined in , and return the task processing result according to the structure defined in ." + }, + "task_target": { + "type": "string", + "description": "The task target supports 3 options: Create New Tiered Power-Down Task, Create Restoration Task, Modify Tiered Power-Down Task. Among them, Create Restoration Task is used to roll back the configuration delivered by an existing tiered power-down task. When selecting Create New Tiered Power-Down Task or Modify Tiered Power-Down Task, the backup power endurance duration target must be provided.", + "examples": [ + "Create New Tiered Power-Down Task, backup power endurance duration target: 4h" + ], + "x-a2at-value-constraint": "1. Create New Tiered Power-Down Task: backup power endurance duration target required, e.g. 4h. 2. Create Restoration Task: roll back wireless intelligent backup power configuration. 3. Modify Tiered Power-Down Task: backup power endurance duration target required, e.g. 4h." + }, + "task_object": { + "type": "string", + "description": "Supports list format, where each item contains site name and the list of cells included in the site. Required for Create New Tiered Power-Down Task, optional for Modify Tiered Power-Down Task, optional for Create Restoration Task.", + "examples": [ + "Longyan Xinluo Crystal Lanting-HRHH: 460-00-2136088-511: Critical Protection, 4G, 2.3GHz; 460-00-2136088-512: Critical Protection, 4G, 2.3GHz; 460-00-2136088-513: Key, 4G, 2.3GHz" + ], + "x-a2at-value-constraint": "Site name (required for Create New Tiered Power-Down Task, optional for Modify Tiered Power-Down Task, optional for Create Restoration Task). Cell list contains: cell identifier (CGI, e.g. 460-00-2136088-512), cell protection level (Critical Protection/Key/General), cell frequency band (e.g. 2.6GHz), cell technology (4G or LTE/5G or NR), resident users, current RRC users, traffic, voice traffic. Cell list is optional for Create New Tiered Power-Down Task and Modify Tiered Power-Down Task, not required for Create Restoration Task." + }, + "task_context": { + "type": "string", + "description": "Provide the background and context information for task execution.", + "examples": [ + "" + ], + "x-a2at-value-constraint": "Optional" + }, + "expected_output": { + "type": "string", + "description": "When Create New Tiered Power-Down Task or Modify Tiered Power-Down Task, provide execution result and cell lists for non-shutdown and executed shutdown. When Create Restoration Task, provide execution result and cell lists for no-rollback and executed rollback.", + "examples": [ + "" + ], + "x-a2at-value-constraint": "1. Create New Tiered Power-Down Task or Modify Tiered Power-Down Task: execution result (Success/Failure); non-shutdown cell list (site name, cell identifier CGI); executed shutdown cell list (site name, cell identifier CGI, frequency band, shutdown execution result, shutdown execution time). 2. Create Restoration Task: execution result (Success/Failure); no-rollback cell list (site name, cell identifier CGI); executed rollback cell list (site name, cell identifier CGI, frequency band, rollback execution result, rollback execution time)." + } + }, + "required": ["operation_type", "task_description"] +} diff --git a/a2a-t-resources/src/main/resources/prompt_resources/slots/Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1/zh-CN/slot.json b/a2a-t-resources/src/main/resources/prompt_resources/slots/Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1/zh-CN/slot.json new file mode 100644 index 00000000..adfe7046 --- /dev/null +++ b/a2a-t-resources/src/main/resources/prompt_resources/slots/Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1/zh-CN/slot.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "additionalProperties": false, + "properties": { + "操作类型": { + "type": "string", + "description": "请提供操作类型,取值范围:创建、修改。", + "examples": [ + "创建" + ], + "x-a2at-value-constraint": "取值范围:创建、修改" + }, + "任务描述": { + "type": "string", + "description": "基于任务对象、任务上下文进行无线智能备电管理,达成任务目标中定义的备电目标,按照预期输出中定义的结构返回任务处理结果。", + "examples": [ + "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果" + ], + "x-a2at-value-constraint": "基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果" + }, + "任务目标": { + "type": "string", + "description": "任务目标支持3种选项:创建新的分级下电任务、创建恢复任务、修改分级下电任务。其中,创建恢复任务用于回退已有的分级下电任务下发的配置。选择创建新的分级下电任务或修改分级下电任务时,需提供备电保障的续航时长目标。", + "examples": [ + "创建新的分级下电任务,备电保障的续航时长目标:4h" + ], + "x-a2at-value-constraint": "1. 创建新的分级下电任务:需提供备电保障的续航时长目标,如4h。 2. 创建恢复任务:回退无线智能备电配置。 3. 修改分级下电任务:需提供备电保障的续航时长目标,如4h。" + }, + "任务对象": { + "type": "string", + "description": "支持列表形式,列表中的每一项包含站点名称及站点所包含的小区列表。创建新的分级下电任务时必填,修改分级下电任务时选填,创建恢复任务时选填。", + "examples": [ + "龙岩新罗水晶澜庭-HRHH:460-00-2136088-511:重保,4G,2.3GHz;460-00-2136088-512:重保,4G,2.3GHz;460-00-2136088-513:关键,4G,2.3GHz" + ], + "x-a2at-value-constraint": "站点名称(创建新的分级下电任务时必填,修改分级下电任务时选填,创建恢复任务时选填)。小区列表包含:小区标识(CGI,如460-00-2136088-512)、小区保障等级(重保/关键/一般)、小区频段(如2.6GHz)、小区制式(4G或LTE/5G或NR)、常住用户、当前RRC用户、流量、话务。创建新的分级下电任务和修改分级下电任务时选填小区列表,创建恢复任务时无需填写。" + }, + "任务上下文": { + "type": "string", + "description": "提供任务执行的背景和上下文信息。", + "examples": [ + "" + ], + "x-a2at-value-constraint": "选填" + }, + "预期输出": { + "type": "string", + "description": "创建新的分级下电任务或修改分级下电任务时,提供执行结果及不做关断和执行关断的小区列表。创建恢复任务时,提供执行结果及无需回退和执行回退的小区列表。", + "examples": [ + "" + ], + "x-a2at-value-constraint": "1. 创建新的分级下电任务或修改分级下电任务时:执行结果(成功/失败);不做关断的小区列表(站点名称、小区标识CGI);执行关断的小区列表(站点名称、小区标识CGI、频段、关断执行结果、执行关断时间)。 2. 创建恢复任务时:执行结果(成功/失败);无需回退的小区列表(站点名称、小区标识CGI);执行回退的小区列表(站点名称、小区标识CGI、频段、回退执行结果、执行回退时间)。" + } + }, + "required": ["操作类型", "任务描述"] +} diff --git a/a2a-t-resources/src/main/resources/prompt_resources/templates/Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1/en-US/template.md b/a2a-t-resources/src/main/resources/prompt_resources/templates/Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1/en-US/template.md new file mode 100644 index 00000000..c5f669dc --- /dev/null +++ b/a2a-t-resources/src/main/resources/prompt_resources/templates/Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1/en-US/template.md @@ -0,0 +1,100 @@ +## Operation Type + +{{operation_type}} (required) + +Requirement: + +1. Please provide the operation type. Allowed values: Create, Modify + +## Task Type + +Wireless Intelligent Backup Power Management + +## Task Description + +{{task_description}} (required) + +Requirement: + +1. Based on and , perform wireless intelligent backup power management to achieve the backup power target defined in , and return the task processing result according to the structure defined in . + +## Task Target + +{{task_target}} (required) + +Requirement: + +1. The task target supports 3 options: Create New Tiered Power-Down Task, Create Restoration Task, Modify Tiered Power-Down Task. Among them, `Create Restoration Task` is used to roll back the configuration delivered by an existing tiered power-down task. +The specific requirements for these 3 options are as follows: + - When selecting `Create New Tiered Power-Down Task` or `Modify Tiered Power-Down Task`, the following information must be provided: + - Backup power endurance duration target; example: "4h"; + - When selecting `Create Restoration Task`, the content is: + - Roll back wireless intelligent backup power configuration; + +## Task Object + +{{task_object}} (required for Create New Tiered Power-Down Task, optional for Modify Tiered Power-Down Task, optional for Create Restoration Task) + +Requirement: + +1. Supports list format, where each item in the list contains the following information: + - Site Name: The name of the site that needs to execute the backup power task; example: "Longyan Xinluo Crystal Lanting-HRHH"; (Required for Create New Tiered Power-Down Task, Optional for Modify Tiered Power-Down Task, Optional for Create Restoration Task) + - The list of cells included in the site, which may contain the following: (Optional for Create New Tiered Power-Down Task, Optional for Modify Tiered Power-Down Task, Not required for Create Restoration Task) + - Cell Identifier: Using CGI; example: "460-00-2136088-512"; + - Cell Protection Level; allowed values include: Critical Protection, Key, General; example: "Critical Protection"; + - Cell Frequency Band; example: 2.6GHz; + - Cell Technology; allowed values: 4G (or LTE), 5G (or NR); example: 5G; + - Resident Users; example: 326 households; + - Current RRC Users; example: 216 households; + - Traffic; example: 12.6GB; + - Voice Traffic; example: 72Erl; + +Example: + - Longyan Xinluo Crystal Lanting-HRHH: + - 460-00-2136088-511: Critical Protection, 4G, 2.3GHz + - 460-00-2136088-512: Critical Protection, 4G, 2.3GHz + - 460-00-2136088-513: Key, 4G, 2.3GHz + - Longyan Xinluo Longhui Community-HRHH: + - 460-00-2134161-514: Key, 5G, 2.6GHz + - 460-00-2134161-515: General, 5G, 2.6GHz + - 460-00-2134161-516: General, 5G, 2.6GHz + +## Task Context + +{{task_context}} (optional) + +## Expected Output + +{{expected_output}} (optional) + +Requirement: + +1. When `Create New Tiered Power-Down Task` or `Modify Tiered Power-Down Task`, provide the following content: + - Execution Result; allowed values include: Success, Failure; (required) + - Provide the cell lists for non-shutdown and executed shutdown separately (required) + - Cell list not to be shut down in this task: + - Site Name + - The list of cells included in the site, which must contain the following: + - Cell Identifier: Using CGI; example: "460-00-2136088-511"; + - Cell list for executed shutdown: + - Site Name + - The list of cells included in the site, which must contain the following: + - Cell Identifier: Using CGI; example: "460-00-2136088-513"; + - Frequency Band; example: 2.3GHz; + - Cell Shutdown Execution Result; example: Execution Success; + - Shutdown Execution Time; example: 2026/9/16 21:42:09; + +2. When `Create Restoration Task`, provide the following content: + - Execution Result; allowed values include: Success, Failure; (required) + - Provide the cell lists for no-rollback and executed rollback separately (required) + - Cell list not requiring rollback in this task: + - Site Name + - The list of cells included in the site, which must contain the following: + - Cell Identifier: Using CGI; example: "460-00-2136088-511"; + - Cell list for executed rollback: + - Site Name + - The list of cells included in the site, which must contain the following: + - Cell Identifier: Using CGI; example: "460-00-2136088-513"; + - Frequency Band; example: 2.3GHz; + - Cell Rollback Execution Result; example: Rollback Success; + - Rollback Execution Time; example: 2026/9/16 23:30:00; diff --git a/a2a-t-resources/src/main/resources/prompt_resources/templates/Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1/zh-CN/template.md b/a2a-t-resources/src/main/resources/prompt_resources/templates/Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1/zh-CN/template.md new file mode 100644 index 00000000..b7649209 --- /dev/null +++ b/a2a-t-resources/src/main/resources/prompt_resources/templates/Task-T/network-layer/ran-intelligent-backup-battery-endurance/v1/zh-CN/template.md @@ -0,0 +1,100 @@ +## 操作类型(Operation Type) + +{{操作类型}}(必填) + +要求: + +1. 请提供操作类型,取值范围:创建、修改 + +## 任务类型(Task Type) + +无线智能备电管理 + +## 任务描述(Task Description) + +{{任务描述}}(必填) + +要求: + +1. 基于<任务对象>、<任务上下文> 进行无线智能备电管理,达成<任务目标>中定义的备电目标,按照<预期输出>中定义的结构返回任务处理结果 + +## 任务目标(Task Target) + +{{任务目标}}(必填) + +要求: + +1. 任务目标支持3种选项:创建新的分级下电任务、创建恢复任务、修改分级下电任务。其中,`创建恢复任务`用于回退已有的分级下电任务下发的配置。 +这3种选项的具体要求如下: + - 选择`创建新的分级下电任务`或`修改分级下电任务`时,需提供如下信息: + - 备电保障的续航时长目标;举例:"4h"; + - 选择`创建恢复任务`时,内容为: + - 回退无线智能备电配置; + +## 任务对象(Task Object) + +{{任务对象}}(创建新的分级下电任务时必填,修改分级下电任务时选填,创建恢复任务时选填) + +要求: + +1. 支持列表形式,列表中的每一项包含如下信息: + - 站点名称:需要执行备电任务的站点名称;举例:"龙岩新罗水晶澜庭-HRHH";(创建新的分级下电任务时必填,修改分级下电任务时选填,创建恢复任务时选填) + - 站点所包含的小区列表,可包含以下内容:(创建新的分级下电任务时选填,修改分级下电任务时选填,创建恢复任务时无需填写) + - 小区标识:采用CGI;样例:"460-00-2136088-512"; + - 小区保障等级;取值范围包括:重保、关键、一般;样例:"重保"; + - 小区频段;样例:2.6GHz; + - 小区制式;取值范围:4G(或LTE)、5G(或NR);样例:5G; + - 常住用户;样例:326 户; + - 当前 RRC 用户;样例:216 户; + - 流量;样例:12.6GB; + - 话务;样例:72Erl; + +样例: + - 龙岩新罗水晶澜庭-HRHH: + - 460-00-2136088-511:重保,4G,2.3GHz + - 460-00-2136088-512:重保,4G,2.3GHz + - 460-00-2136088-513:关键,4G,2.3GHz + - 龙岩新罗龙辉小区-HRHH: + - 460-00-2134161-514:关键,5G,2.6GHz + - 460-00-2134161-515:一般,5G,2.6GHz + - 460-00-2134161-516:一般,5G,2.6GHz + +## 任务上下文(Task Context) + +{{任务上下文}}(选填) + +## 预期输出(Expected Output) + +{{预期输出}}(选填) + +要求: + +1. `创建新的分级下电任务`或`修改分级下电任务`时,提供如下内容: + - 执行结果;取值范围包括:成功、失败;(必填) + - 分别提供不做关断和执行关断的小区列表(必填) + - 本次任务不做关断的小区列表: + - 站点名称 + - 站点所包含的小区列表,要求包含以下内容: + - 小区的标识:采用CGI;样例:"460-00-2136088-511"; + - 执行关断的小区列表: + - 站点名称 + - 站点所包含的小区列表,要求包含以下内容: + - 小区的标识:采用CGI;样例:"460-00-2136088-513"; + - 频段;样例:2.3GHz; + - 小区的关断执行结果;样例:执行成功; + - 执行关断的时间;样例:2026/9/16 21:42:09; + +2. `创建恢复任务`时,提供如下内容: + - 执行结果;取值范围包括:成功、失败;(必填) + - 分别提供无需回退和完成回退操作的小区列表(必填) + - 本次任务无需回退的小区列表: + - 站点名称 + - 站点所包含的小区列表,要求包含以下内容: + - 小区的标识:采用CGI;样例:"460-00-2136088-511"; + - 执行回退的小区列表: + - 站点名称 + - 站点所包含的小区列表,要求包含以下内容: + - 小区的标识:采用CGI;样例:"460-00-2136088-513"; + - 频段;样例:2.3GHz; + - 小区的回退执行结果;样例:回退执行成功; + - 执行回退的时间;样例:2026/9/16 23:30:00; From 1470a6b88a9290c23646b99e514de504d2fcbe09 Mon Sep 17 00:00:00 2001 From: Welkin1027 Date: Wed, 14 Oct 2026 10:40:50 +0800 Subject: [PATCH 2/2] test(corpus): add ran-intelligent-backup-battery-endurance modify/create Signed-off-by: Welkin1027 --- .../net/openan/a2at/sdk/resources/StandardTemplatesTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a2a-t-resources/src/test/java/net/openan/a2at/sdk/resources/StandardTemplatesTest.java b/a2a-t-resources/src/test/java/net/openan/a2at/sdk/resources/StandardTemplatesTest.java index 677f02af..20f928a0 100644 --- a/a2a-t-resources/src/test/java/net/openan/a2at/sdk/resources/StandardTemplatesTest.java +++ b/a2a-t-resources/src/test/java/net/openan/a2at/sdk/resources/StandardTemplatesTest.java @@ -47,8 +47,8 @@ void groupsPartitionAllConstants() { grouped.addAll(StandardTemplates.NOTIFICATION); grouped.addAll(StandardTemplates.AUTHORIZATION); grouped.addAll(StandardTemplates.NEGOTIATION); - assertEquals(12, grouped.size(), "expected the 12 built-in templates"); - assertEquals(2, StandardTemplates.TASK.size()); + assertEquals(13, grouped.size(), "expected the 13 built-in templates"); + assertEquals(3, StandardTemplates.TASK.size()); assertEquals(2, StandardTemplates.NOTIFICATION.size()); assertEquals(1, StandardTemplates.AUTHORIZATION.size()); assertEquals(7, StandardTemplates.NEGOTIATION.size());