diff --git a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/dynamic/prompt/model/enums/PromptEnum.java b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/dynamic/prompt/model/enums/PromptEnum.java index 64c5c57b38..693f116867 100644 --- a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/dynamic/prompt/model/enums/PromptEnum.java +++ b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/dynamic/prompt/model/enums/PromptEnum.java @@ -31,109 +31,11 @@ public enum PromptEnum { AGENT_STUCK_ERROR("AGENT_STUCK_ERROR", MessageType.SYSTEM, PromptType.AGENT, true, "agent/stuck-error.txt"), SUMMARY_PLAN_TEMPLATE("SUMMARY_PLAN_TEMPLATE", MessageType.SYSTEM, PromptType.PLANNING, true, "workflow/summary-plan-template.txt"), - MAPREDUCE_TOOL_DESCRIPTION("MAPREDUCE_TOOL_DESCRIPTION", MessageType.SYSTEM, PromptType.AGENT, true, - "tool/mapreduce-tool-description.txt"), - MAPREDUCE_TOOL_PARAMETERS("MAPREDUCE_TOOL_PARAMETERS", MessageType.SYSTEM, PromptType.AGENT, true, - "tool/mapreduce-tool-parameters.txt"), AGENT_DEBUG_DETAIL_OUTPUT("AGENT_DEBUG_DETAIL_OUTPUT", MessageType.SYSTEM, PromptType.AGENT, true, "agent/debug-detail-output.txt"), AGENT_NORMAL_OUTPUT("AGENT_NORMAL_OUTPUT", MessageType.SYSTEM, PromptType.AGENT, true, "agent/normal-output.txt"), AGENT_PARALLEL_TOOL_CALLS_RESPONSE("AGENT_PARALLEL_TOOL_CALLS_RESPONSE", MessageType.SYSTEM, PromptType.AGENT, true, - "agent/parallel-tool-calls-response.txt"), - FORM_INPUT_TOOL_DESCRIPTION("FORM_INPUT_TOOL_DESCRIPTION", MessageType.SYSTEM, PromptType.AGENT, true, - "tool/form-input-tool-description.txt"), - FORM_INPUT_TOOL_PARAMETERS("FORM_INPUT_TOOL_PARAMETERS", MessageType.SYSTEM, PromptType.AGENT, true, - "tool/form-input-tool-parameters.txt"), - - // Bash Tool - BASH_TOOL_DESCRIPTION("BASH_TOOL_DESCRIPTION", MessageType.SYSTEM, PromptType.TOOL_DESCRIPTION, true, - "tool/bash-tool-description.txt"), - BASH_TOOL_PARAMETERS("BASH_TOOL_PARAMETERS", MessageType.SYSTEM, PromptType.TOOL_PARAMETER, true, - "tool/bash-tool-parameters.txt"), - - // Text File Operator Tool - TEXTFILEOPERATOR_TOOL_DESCRIPTION("TEXTFILEOPERATOR_TOOL_DESCRIPTION", MessageType.SYSTEM, - PromptType.TOOL_DESCRIPTION, true, "tool/textfileoperator-tool-description.txt"), - TEXTFILEOPERATOR_TOOL_PARAMETERS("TEXTFILEOPERATOR_TOOL_PARAMETERS", MessageType.SYSTEM, PromptType.TOOL_PARAMETER, - true, "tool/textfileoperator-tool-parameters.txt"), - - // Browser Use Tool - BROWSER_USE_TOOL_DESCRIPTION("BROWSER_USE_TOOL_DESCRIPTION", MessageType.SYSTEM, PromptType.TOOL_DESCRIPTION, true, - "tool/browser-use-tool-description.txt"), - BROWSER_USE_TOOL_PARAMETERS("BROWSER_USE_TOOL_PARAMETERS", MessageType.SYSTEM, PromptType.TOOL_PARAMETER, true, - "tool/browser-use-tool-parameters.txt"), - - // Python Execute Tool - PYTHON_EXECUTE_TOOL_DESCRIPTION("PYTHON_EXECUTE_TOOL_DESCRIPTION", MessageType.SYSTEM, PromptType.TOOL_DESCRIPTION, - true, "tool/python-execute-tool-description.txt"), - PYTHON_EXECUTE_TOOL_PARAMETERS("PYTHON_EXECUTE_TOOL_PARAMETERS", MessageType.SYSTEM, PromptType.TOOL_PARAMETER, - true, "tool/python-execute-tool-parameters.txt"), - - // Database Use Tool - DATABASE_USE_TOOL_DESCRIPTION("DATABASE_USE_TOOL_DESCRIPTION", MessageType.SYSTEM, PromptType.TOOL_DESCRIPTION, - true, "tool/database-use-tool-description.txt"), - DATABASE_USE_TOOL_PARAMETERS("DATABASE_USE_TOOL_PARAMETERS", MessageType.SYSTEM, PromptType.TOOL_PARAMETER, true, - "tool/database-use-tool-parameters.txt"), - - // Cron Tool - CRON_TOOL_TOOL_DESCRIPTION("CRON_TOOL_TOOL_DESCRIPTION", MessageType.SYSTEM, PromptType.TOOL_DESCRIPTION, true, - "tool/cron-tool-tool-description.txt"), - CRON_TOOL_TOOL_PARAMETERS("CRON_TOOL_TOOL_PARAMETERS", MessageType.SYSTEM, PromptType.TOOL_PARAMETER, true, - "tool/cron-tool-tool-parameters.txt"), - - // Inner Storage Content Tool - INNER_STORAGE_CONTENT_TOOL_TOOL_DESCRIPTION("INNER_STORAGE_CONTENT_TOOL_TOOL_DESCRIPTION", MessageType.SYSTEM, - PromptType.TOOL_DESCRIPTION, true, "tool/inner-storage-content-tool-tool-description.txt"), - INNER_STORAGE_CONTENT_TOOL_TOOL_PARAMETERS("INNER_STORAGE_CONTENT_TOOL_TOOL_PARAMETERS", MessageType.SYSTEM, - PromptType.TOOL_PARAMETER, true, "tool/inner-storage-content-tool-tool-parameters.txt"), - - // Doc Loader Tool - DOC_LOADER_TOOL_DESCRIPTION("DOC_LOADER_TOOL_DESCRIPTION", MessageType.SYSTEM, PromptType.TOOL_DESCRIPTION, true, - "tool/doc-loader-tool-description.txt"), - DOC_LOADER_TOOL_PARAMETERS("DOC_LOADER_TOOL_PARAMETERS", MessageType.SYSTEM, PromptType.TOOL_PARAMETER, true, - "tool/doc-loader-tool-parameters.txt"), - - // File Merge Tool - FILE_MERGE_TOOL_TOOL_DESCRIPTION("FILE_MERGE_TOOL_TOOL_DESCRIPTION", MessageType.SYSTEM, - PromptType.TOOL_DESCRIPTION, true, "tool/file-merge-tool-description.txt"), - FILE_MERGE_TOOL_TOOL_PARAMETERS("FILE_MERGE_TOOL_TOOL_PARAMETERS", MessageType.SYSTEM, PromptType.TOOL_PARAMETER, - true, "tool/file-merge-tool-parameters.txt"), - - // Data Split Tool - DATA_SPLIT_TOOL_DESCRIPTION("DATA_SPLIT_TOOL_DESCRIPTION", MessageType.SYSTEM, PromptType.TOOL_DESCRIPTION, true, - "tool/data-split-tool-description.txt"), - DATA_SPLIT_TOOL_PARAMETERS("DATA_SPLIT_TOOL_PARAMETERS", MessageType.SYSTEM, PromptType.TOOL_PARAMETER, true, - "tool/data-split-tool-parameters.txt"), - - // Map Output Tool - MAP_OUTPUT_TOOL_DESCRIPTION("MAP_OUTPUT_TOOL_DESCRIPTION", MessageType.SYSTEM, PromptType.TOOL_DESCRIPTION, true, - "tool/map-output-tool-description.txt"), - MAP_OUTPUT_TOOL_PARAMETERS("MAP_OUTPUT_TOOL_PARAMETERS", MessageType.SYSTEM, PromptType.TOOL_PARAMETER, true, - "tool/map-output-tool-parameters.txt"), - - // Reduce Operation Tool - REDUCE_OPERATION_TOOL_DESCRIPTION("REDUCE_OPERATION_TOOL_DESCRIPTION", MessageType.SYSTEM, - PromptType.TOOL_DESCRIPTION, true, "tool/reduce-operation-tool-description.txt"), - REDUCE_OPERATION_TOOL_PARAMETERS("REDUCE_OPERATION_TOOL_PARAMETERS", MessageType.SYSTEM, PromptType.TOOL_PARAMETER, - true, "tool/reduce-operation-tool-parameters.txt"), - - // Finalize Tool - FINALIZE_TOOL_DESCRIPTION("FINALIZE_TOOL_DESCRIPTION", MessageType.SYSTEM, PromptType.TOOL_DESCRIPTION, true, - "tool/finalize-tool-description.txt"), - FINALIZE_TOOL_PARAMETERS("FINALIZE_TOOL_PARAMETERS", MessageType.SYSTEM, PromptType.TOOL_PARAMETER, true, - "tool/finalize-tool-parameters.txt"), - - // Terminate Tool - TERMINATE_TOOL_DESCRIPTION("TERMINATE_TOOL_DESCRIPTION", MessageType.SYSTEM, PromptType.TOOL_DESCRIPTION, true, - "tool/terminate-tool-description.txt"), - TERMINATE_TOOL_PARAMETERS("TERMINATE_TOOL_PARAMETERS", MessageType.SYSTEM, PromptType.TOOL_PARAMETER, true, - "tool/terminate-tool-parameters.txt"), - - // PPT Generator Tool - PPTGENERATOROPERATOR_TOOL_DESCRIPTION("PPTGENERATOROPERATOR_TOOL_DESCRIPTION", MessageType.SYSTEM, - PromptType.TOOL_DESCRIPTION, true, "tool/ppt-generator-operator-tool-description.txt"), - PPTGENERATOROPERATOR_TOOL_PARAMETERS("PPTGENERATOROPERATOR_TOOL_PARAMETERS", MessageType.SYSTEM, - PromptType.TOOL_PARAMETER, true, "tool/ppt-generator-operator-tool-parameters.txt"); + "agent/parallel-tool-calls-response.txt"); private String promptName; diff --git a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/dynamic/prompt/model/enums/PromptType.java b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/dynamic/prompt/model/enums/PromptType.java index 99e008ebcd..5f9f342006 100644 --- a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/dynamic/prompt/model/enums/PromptType.java +++ b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/dynamic/prompt/model/enums/PromptType.java @@ -17,6 +17,6 @@ public enum PromptType { - LLM, PLANNING, AGENT, TOOL_DESCRIPTION, TOOL_PARAMETER + LLM, PLANNING, AGENT } diff --git a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/planning/PlanningFactory.java b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/planning/PlanningFactory.java index 62bc86aba2..40aede64b3 100644 --- a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/planning/PlanningFactory.java +++ b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/planning/PlanningFactory.java @@ -22,7 +22,6 @@ import java.util.Map; import java.util.concurrent.TimeUnit; -import com.alibaba.cloud.ai.example.manus.tool.ToolPromptManager; import org.apache.hc.client5.http.classic.HttpClient; import org.apache.hc.client5.http.config.RequestConfig; import org.apache.hc.client5.http.impl.classic.HttpClients; @@ -144,9 +143,6 @@ public class PlanningFactory implements IPlanningFactory { @Autowired private StreamingResponseHandler streamingResponseHandler; - @Autowired - private ToolPromptManager toolPromptManager; - @Autowired @Lazy private CronService cronService; @@ -222,21 +218,18 @@ public Map toolCallbackMap(String planId, String ro return toolCallbackMap; } // Add all tool definitions - toolDefinitions - .add(BrowserUseTool.getInstance(chromeDriverService, innerStorageService, objectMapper, toolPromptManager)); - toolDefinitions.add(DatabaseUseTool.getInstance(dataSourceService, objectMapper, toolPromptManager)); - toolDefinitions.add(new TerminateTool(planId, terminateColumns, toolPromptManager)); - toolDefinitions.add(new Bash(unifiedDirectoryManager, objectMapper, toolPromptManager)); - toolDefinitions.add(new DocLoaderTool(toolPromptManager)); - toolDefinitions - .add(new TextFileOperator(textFileService, innerStorageService, objectMapper, toolPromptManager)); + toolDefinitions.add(BrowserUseTool.getInstance(chromeDriverService, innerStorageService, objectMapper)); + toolDefinitions.add(DatabaseUseTool.getInstance(dataSourceService, objectMapper)); + toolDefinitions.add(new TerminateTool(planId, terminateColumns)); + toolDefinitions.add(new Bash(unifiedDirectoryManager, objectMapper)); + toolDefinitions.add(new DocLoaderTool()); + toolDefinitions.add(new TextFileOperator(textFileService, innerStorageService, objectMapper)); // toolDefinitions.add(new InnerStorageTool(unifiedDirectoryManager)); - toolDefinitions - .add(new InnerStorageContentTool(unifiedDirectoryManager, summaryWorkflow, recorder, toolPromptManager)); - toolDefinitions.add(new FileMergeTool(unifiedDirectoryManager, toolPromptManager)); + toolDefinitions.add(new InnerStorageContentTool(unifiedDirectoryManager, summaryWorkflow, recorder)); + toolDefinitions.add(new FileMergeTool(unifiedDirectoryManager)); // toolDefinitions.add(new GoogleSearch()); // toolDefinitions.add(new PythonExecute()); - toolDefinitions.add(new FormInputTool(objectMapper, promptService)); + toolDefinitions.add(new FormInputTool(objectMapper)); toolDefinitions .add(new DataSplitTool(planId, manusProperties, sharedStateManager, unifiedDirectoryManager, objectMapper)); toolDefinitions.add(new MapOutputTool(planId, manusProperties, sharedStateManager, unifiedDirectoryManager, @@ -244,7 +237,7 @@ public Map toolCallbackMap(String planId, String ro toolDefinitions.add(new ReduceOperationTool(planId, manusProperties, sharedStateManager, unifiedDirectoryManager, terminateColumns)); toolDefinitions.add(new FinalizeTool(planId, manusProperties, sharedStateManager, unifiedDirectoryManager)); - toolDefinitions.add(new CronTool(cronService, objectMapper, toolPromptManager)); + toolDefinitions.add(new CronTool(cronService, objectMapper)); toolDefinitions.add(pptGeneratorOperator); List functionCallbacks = mcpService.getFunctionCallbacks(planId); diff --git a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/DocLoaderTool.java b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/DocLoaderTool.java index 4fceeb8dd5..24ddb9e8bc 100644 --- a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/DocLoaderTool.java +++ b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/DocLoaderTool.java @@ -69,8 +69,6 @@ public void setFilePath(String filePath) { private static final String name = "doc_loader"; - private final ToolPromptManager toolPromptManager; - public OpenAiApi.FunctionTool getToolDefinition() { String description = getDescription(); String parameters = getParameters(); @@ -82,21 +80,21 @@ public OpenAiApi.FunctionTool getToolDefinition() { /** * Get FunctionToolCallback for Spring AI */ - public static FunctionToolCallback getFunctionToolCallback( - ToolPromptManager toolPromptManager) { + public static FunctionToolCallback getFunctionToolCallback() { return FunctionToolCallback .builder(name, - (DocLoaderInput input, - org.springframework.ai.chat.model.ToolContext context) -> new DocLoaderTool( - toolPromptManager) - .run(input)) - .description(toolPromptManager.getToolDescription("doc_loader")) + (DocLoaderInput input, org.springframework.ai.chat.model.ToolContext context) -> new DocLoaderTool() + .run(input)) + .description(""" + Get the content information of a local file at a specified path. + Use this tool when you want to get some related information asked by the user. + This tool accepts the file path and gets the related information content. + """) .inputType(DocLoaderInput.class) .build(); } - public DocLoaderTool(ToolPromptManager toolPromptManager) { - this.toolPromptManager = toolPromptManager; + public DocLoaderTool() { } private String lastFilePath = ""; @@ -145,12 +143,31 @@ public String getName() { @Override public String getDescription() { - return toolPromptManager.getToolDescription("doc_loader"); + return """ + Get the content information of a local file at a specified path. + Use this tool when you want to get some related information asked by the user. + This tool accepts the file path and gets the related information content. + """; } @Override public String getParameters() { - return toolPromptManager.getToolParameters("doc_loader"); + return """ + { + "type": "object", + "properties": { + "file_type": { + "type": "string", + "description": "(required) File type, only support pdf file." + }, + "file_path": { + "type": "string", + "description": "(required) Get the absolute path of the file from the user request." + } + }, + "required": ["file_type", "file_path"] + } + """; } @Override diff --git a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/FormInputTool.java b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/FormInputTool.java index 8fc159d617..a1d528e5ac 100644 --- a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/FormInputTool.java +++ b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/FormInputTool.java @@ -15,7 +15,6 @@ */ package com.alibaba.cloud.ai.example.manus.tool; -import com.alibaba.cloud.ai.example.manus.dynamic.prompt.service.PromptService; import com.alibaba.cloud.ai.example.manus.tool.code.ToolExecuteResult; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -36,28 +35,65 @@ public class FormInputTool extends AbstractBaseTool private final ObjectMapper objectMapper; - private final PromptService promptService; - private static final Logger log = LoggerFactory.getLogger(FormInputTool.class); private String getToolParameters() { - try { - return promptService.getPromptByName("FORM_INPUT_TOOL_PARAMETERS").getPromptContent(); - } - catch (Exception e) { - log.warn("Failed to load prompt-based tool parameters, using legacy configuration", e); - return LEGACY_PARAMETERS; - } + return """ + { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of the form and what information is being collected" + }, + "inputs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name/ID of the input field" + }, + "label": { + "type": "string", + "description": "Display label for the input field" + }, + "type": { + "type": "string", + "enum": ["text", "number", "email", "password", "textarea", "select", "checkbox", "radio"], + "description": "Type of input field" + }, + "required": { + "type": "boolean", + "description": "Whether this field is required" + }, + "placeholder": { + "type": "string", + "description": "Placeholder text for the input field" + }, + "options": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Options for select, checkbox, or radio inputs" + } + }, + "required": ["name", "label", "type"] + }, + "description": "Array of input field definitions" + } + }, + "required": ["description", "inputs"] + } + """; } private String getToolDescription() { - try { - return promptService.getPromptByName("FORM_INPUT_TOOL_DESCRIPTION").getPromptContent(); - } - catch (Exception e) { - log.warn("Failed to load prompt-based tool description, using legacy configuration", e); - return LEGACY_DESCRIPTION; - } + return """ + Create interactive forms to collect user input. This tool allows you to define form fields and collect structured data from users through a web interface. + """; } private static final String LEGACY_PARAMETERS = """ @@ -180,9 +216,8 @@ public void setDescription(String description) { } - public FormInputTool(ObjectMapper objectMapper, PromptService promptService) { + public FormInputTool(ObjectMapper objectMapper) { this.objectMapper = objectMapper; - this.promptService = promptService; } public enum InputState { diff --git a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/TerminateTool.java b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/TerminateTool.java index aade5634fc..566f212d0b 100644 --- a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/TerminateTool.java +++ b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/TerminateTool.java @@ -31,17 +31,18 @@ public class TerminateTool extends AbstractBaseTool> impleme private final List columns; - private final ToolPromptManager toolPromptManager; - private String lastTerminationMessage = ""; private boolean isTerminated = false; private String terminationTimestamp = ""; - public static OpenAiApi.FunctionTool getToolDefinition(List columns, ToolPromptManager toolPromptManager) { + public static OpenAiApi.FunctionTool getToolDefinition(List columns) { String parameters = generateParametersJson(columns); - String description = toolPromptManager.getToolDescription("terminate"); + String description = """ + Terminate the current execution step with structured data. + Provide data in JSON format with 'columns' array and 'data' array containing rows of values. + """; OpenAiApi.FunctionTool.Function function = new OpenAiApi.FunctionTool.Function(description, name, parameters); return new OpenAiApi.FunctionTool(function); } @@ -89,11 +90,10 @@ public String getCurrentToolStateString() { currentPlanId != null ? currentPlanId : "N/A", columns != null ? String.join(", ", columns) : "N/A"); } - public TerminateTool(String planId, List columns, ToolPromptManager toolPromptManager) { + public TerminateTool(String planId, List columns) { this.currentPlanId = planId; // If columns is null or empty, use "message" as default column this.columns = (columns == null || columns.isEmpty()) ? List.of("message") : columns; - this.toolPromptManager = toolPromptManager; } @Override @@ -139,12 +139,40 @@ public String getName() { @Override public String getDescription() { - return toolPromptManager.getToolDescription("terminate"); + return """ + Terminate the current execution step with structured data. + Provide data in JSON format with 'columns' array and 'data' array containing rows of values. + """; } @Override public String getParameters() { - return generateParametersJson(this.columns); + return """ + { + "type": "object", + "properties": { + "columns": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Column names for the data structure" + }, + "data": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Data rows, each row should match the columns structure" + } + }, + "required": ["columns", "data"], + "additionalProperties": false + } + """; } @Override diff --git a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/bash/Bash.java b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/bash/Bash.java index 76043929fe..f175eae1f3 100644 --- a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/bash/Bash.java +++ b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/bash/Bash.java @@ -16,7 +16,7 @@ package com.alibaba.cloud.ai.example.manus.tool.bash; import com.alibaba.cloud.ai.example.manus.tool.AbstractBaseTool; -import com.alibaba.cloud.ai.example.manus.tool.ToolPromptManager; + import com.alibaba.cloud.ai.example.manus.tool.code.ToolExecuteResult; import com.alibaba.cloud.ai.example.manus.tool.filesystem.UnifiedDirectoryManager; import com.fasterxml.jackson.databind.ObjectMapper; @@ -30,8 +30,6 @@ public class Bash extends AbstractBaseTool { private final ObjectMapper objectMapper; - private final ToolPromptManager toolPromptManager; - private static final Logger log = LoggerFactory.getLogger(Bash.class); /** @@ -68,11 +66,9 @@ public void setCommand(String command) { private final String name = "bash"; - public Bash(UnifiedDirectoryManager unifiedDirectoryManager, ObjectMapper objectMapper, - ToolPromptManager toolPromptManager) { + public Bash(UnifiedDirectoryManager unifiedDirectoryManager, ObjectMapper objectMapper) { this.unifiedDirectoryManager = unifiedDirectoryManager; this.objectMapper = objectMapper; - this.toolPromptManager = toolPromptManager; } private String lastCommand = ""; @@ -111,12 +107,30 @@ public String getName() { @Override public String getDescription() { - return toolPromptManager.getToolDescription("bash", osName); + return String.format( + """ + Execute bash commands in terminal (current OS: %s). + * Long-running commands: For commands that may run indefinitely, they should be run in background with output redirected to file, e.g.: command = `python3 app.py > server.log 2>&1 &`. + * Interactive commands: If bash command returns exit code `-1`, this means the process is not yet complete. Assistant must send a second terminal call with empty `command` (this will retrieve any additional logs), or can send additional text (set `command` to text) to the running process's STDIN, or can send command=`ctrl+c` to interrupt the process. + * Timeout handling: If command execution result shows "Command timed out. Sending SIGINT to the process", assistant should try to re-run the command in background. + """, + osName); } @Override public String getParameters() { - return toolPromptManager.getToolParameters("bash"); + return """ + { + "type": "object", + "properties": { + "command": { + "type": "string", + "description": "The bash command to execute. Can be empty to view additional logs when previous exit code is `-1`. Can be `ctrl+c` to interrupt the currently running process." + } + }, + "required": ["command"] + } + """; } @Override diff --git a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/browser/BrowserUseTool.java b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/browser/BrowserUseTool.java index 4d892b9109..e41362f433 100644 --- a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/browser/BrowserUseTool.java +++ b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/browser/BrowserUseTool.java @@ -17,7 +17,7 @@ import com.alibaba.cloud.ai.example.manus.config.ManusProperties; import com.alibaba.cloud.ai.example.manus.tool.AbstractBaseTool; -import com.alibaba.cloud.ai.example.manus.tool.ToolPromptManager; + import com.alibaba.cloud.ai.example.manus.tool.browser.actions.BrowserRequestVO; import com.alibaba.cloud.ai.example.manus.tool.browser.actions.ClickByElementAction; import com.alibaba.cloud.ai.example.manus.tool.browser.actions.CloseTabAction; @@ -55,14 +55,11 @@ public class BrowserUseTool extends AbstractBaseTool { private final ObjectMapper objectMapper; - private final ToolPromptManager toolPromptManager; - public BrowserUseTool(ChromeDriverService chromeDriverService, SmartContentSavingService innerStorageService, - ObjectMapper objectMapper, ToolPromptManager toolPromptManager) { + ObjectMapper objectMapper) { this.chromeDriverService = chromeDriverService; this.innerStorageService = innerStorageService; this.objectMapper = objectMapper; - this.toolPromptManager = toolPromptManager; } public DriverWrapper getDriver() { @@ -81,10 +78,8 @@ private Integer getBrowserTimeout() { private final String name = "browser_use"; public static synchronized BrowserUseTool getInstance(ChromeDriverService chromeDriverService, - SmartContentSavingService innerStorageService, ObjectMapper objectMapper, - ToolPromptManager toolPromptManager) { - BrowserUseTool instance = new BrowserUseTool(chromeDriverService, innerStorageService, objectMapper, - toolPromptManager); + SmartContentSavingService innerStorageService, ObjectMapper objectMapper) { + BrowserUseTool instance = new BrowserUseTool(chromeDriverService, innerStorageService, objectMapper); return instance; } @@ -247,12 +242,252 @@ public String getName() { @Override public String getDescription() { - return toolPromptManager.getToolDescription("browser_use"); + return """ + Interact with web browser to perform various operations such as navigation, element interaction, content extraction and tab management. Prioritize this tool for search-related tasks. + + Supported operations include: + - 'navigate': Visit specific URL + - 'click': Click element by index + - 'input_text': Input text in element + - 'key_enter': Press Enter key + - 'screenshot': Capture screenshot + - 'get_html': Get HTML content of current page + - 'get_text': Get text content of current page + - 'execute_js': Execute JavaScript code + - 'scroll': Scroll page up/down + - 'refresh': Refresh current page + - 'new_tab': Open new tab + - 'close_tab': Close current tab + - 'switch_tab': Switch to specific tab + - 'get_element_position_by_name': Get element position by name + - 'move_to_and_click': Move to coordinates and click + + Note: Browser operations have timeout configuration, default is 30 seconds. + """; } @Override public String getParameters() { - return toolPromptManager.getToolParameters("browser_use"); + return """ + { + "oneOf": [ + { + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "navigate" + }, + "url": { + "type": "string", + "description": "URL to navigate to" + } + }, + "required": ["action", "url"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "click" + }, + "index": { + "type": "integer", + "description": "Element index to click" + } + }, + "required": ["action", "index"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "input_text" + }, + "index": { + "type": "integer", + "description": "Element index to input text" + }, + "text": { + "type": "string", + "description": "Text to input" + } + }, + "required": ["action", "index", "text"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "key_enter" + }, + "index": { + "type": "integer", + "description": "Element index to press enter" + } + }, + "required": ["action", "index"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "screenshot" + } + }, + "required": ["action"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "get_html" + } + }, + "required": ["action"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "get_text" + } + }, + "required": ["action"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "execute_js" + }, + "script": { + "type": "string", + "description": "JavaScript code to execute" + } + }, + "required": ["action", "script"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "scroll" + }, + "direction": { + "type": "string", + "enum": ["up", "down"], + "description": "Scroll direction" + } + }, + "required": ["action", "direction"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "switch_tab" + }, + "tab_id": { + "type": "integer", + "description": "Tab ID to switch to" + } + }, + "required": ["action", "tab_id"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "new_tab" + }, + "url": { + "type": "string", + "description": "URL to open in new tab" + } + }, + "required": ["action", "url"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "close_tab" + } + }, + "required": ["action"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "refresh" + } + }, + "required": ["action"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "get_element_position" + }, + "element_name": { + "type": "string", + "description": "Element name to get position" + } + }, + "required": ["action", "element_name"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "move_to_and_click" + }, + "position_x": { + "type": "integer", + "description": "X coordinate to move to and click" + }, + "position_y": { + "type": "integer", + "description": "Y coordinate to move to and click" + } + }, + "required": ["action", "position_x", "position_y"], + "additionalProperties": false + } + ] + } + """; } @Override diff --git a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/code/PythonExecute.java b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/code/PythonExecute.java index 99ff78db35..ca95b5f348 100644 --- a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/code/PythonExecute.java +++ b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/code/PythonExecute.java @@ -16,7 +16,7 @@ package com.alibaba.cloud.ai.example.manus.tool.code; import com.alibaba.cloud.ai.example.manus.tool.AbstractBaseTool; -import com.alibaba.cloud.ai.example.manus.tool.ToolPromptManager; + import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import org.slf4j.Logger; @@ -29,8 +29,6 @@ public class PythonExecute extends AbstractBaseTool { private final ObjectMapper objectMapper; - private final ToolPromptManager toolPromptManager; - private static final Logger log = LoggerFactory.getLogger(PythonExecute.class); /** @@ -71,9 +69,8 @@ public void setCode(String code) { private boolean hasError = false; - public PythonExecute(ObjectMapper objectMapper, ToolPromptManager toolPromptManager) { + public PythonExecute(ObjectMapper objectMapper) { this.objectMapper = objectMapper; - this.toolPromptManager = toolPromptManager; } @Override @@ -171,12 +168,23 @@ public String getName() { @Override public String getDescription() { - return toolPromptManager.getToolDescription("python_execute"); + return "Executes Python code string. Note: Only print outputs are visible, function return values are not captured. Use print statements to see results."; } @Override public String getParameters() { - return toolPromptManager.getToolParameters("python_execute"); + return """ + { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The Python code to execute." + } + }, + "required": ["code"] + } + """; } @Override diff --git a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/cron/CronTool.java b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/cron/CronTool.java index fd0fcb6c14..51292bb63e 100644 --- a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/cron/CronTool.java +++ b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/cron/CronTool.java @@ -18,7 +18,6 @@ import com.alibaba.cloud.ai.example.manus.dynamic.cron.service.CronService; import com.alibaba.cloud.ai.example.manus.dynamic.cron.vo.CronConfig; import com.alibaba.cloud.ai.example.manus.tool.AbstractBaseTool; -import com.alibaba.cloud.ai.example.manus.tool.ToolPromptManager; import com.alibaba.cloud.ai.example.manus.tool.code.ToolExecuteResult; import com.fasterxml.jackson.databind.ObjectMapper; import org.slf4j.Logger; @@ -28,16 +27,13 @@ public class CronTool extends AbstractBaseTool { private final ObjectMapper objectMapper; - private final ToolPromptManager toolPromptManager; - private static final Logger log = LoggerFactory.getLogger(CronTool.class); private final CronService cronService; - public CronTool(CronService cronService, ObjectMapper objectMapper, ToolPromptManager toolPromptManager) { + public CronTool(CronService cronService, ObjectMapper objectMapper) { this.cronService = cronService; this.objectMapper = objectMapper; - this.toolPromptManager = toolPromptManager; } public static class CronToolInput { @@ -118,12 +114,37 @@ public String getName() { @Override public String getDescription() { - return toolPromptManager.getToolDescription("cron_tool"); + return """ + Create and manage scheduled cron tasks. This tool allows you to create recurring tasks that will be executed automatically at specified times using cron expressions. + """; } @Override public String getParameters() { - return toolPromptManager.getToolParameters("cron_tool"); + return """ + { + "type": "object", + "properties": { + "cronName": { + "type": "string", + "description": "Name of the cron task" + }, + "cronTime": { + "type": "string", + "description": "Cron expression for scheduling (e.g., '0 0 8 * * ?' for daily at 8 AM)" + }, + "planTemplateId": { + "type": "string", + "description": "ID of the plan template to execute" + }, + "description": { + "type": "string", + "description": "Description of what this cron task does" + } + }, + "required": ["cronName", "cronTime", "planTemplateId"] + } + """; } @Override diff --git a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/database/DatabaseUseTool.java b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/database/DatabaseUseTool.java index ad0ef4bc89..434d2ca8dc 100644 --- a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/database/DatabaseUseTool.java +++ b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/database/DatabaseUseTool.java @@ -17,7 +17,7 @@ import com.alibaba.cloud.ai.example.manus.config.ManusProperties; import com.alibaba.cloud.ai.example.manus.tool.AbstractBaseTool; -import com.alibaba.cloud.ai.example.manus.tool.ToolPromptManager; + import com.alibaba.cloud.ai.example.manus.tool.code.ToolExecuteResult; import com.alibaba.cloud.ai.example.manus.tool.database.action.ExecuteSqlAction; import com.alibaba.cloud.ai.example.manus.tool.database.action.GetDatasourceInfoAction; @@ -40,14 +40,11 @@ public class DatabaseUseTool extends AbstractBaseTool { private final ObjectMapper objectMapper; - private final ToolPromptManager toolPromptManager; - public DatabaseUseTool(ManusProperties manusProperties, DataSourceService dataSourceService, - ObjectMapper objectMapper, ToolPromptManager toolPromptManager) { + ObjectMapper objectMapper) { this.manusProperties = manusProperties; this.dataSourceService = dataSourceService; this.objectMapper = objectMapper; - this.toolPromptManager = toolPromptManager; } public DataSourceService getDataSourceService() { @@ -68,12 +65,73 @@ public String getName() { @Override public String getDescription() { - return toolPromptManager.getToolDescription("database_use"); + return """ + Interact with database, execute SQL, table structure, index, health status and other operations. Supported operations include: + - 'execute_sql': Execute SQL statements + - 'get_table_name': Find table names based on table comments + - 'get_table_index': Get table index information + - 'get_table_meta': Get complete metadata of table structure, fields, indexes + - 'get_datasource_info': Get data source information + """; } @Override public String getParameters() { - return toolPromptManager.getToolParameters("database_use"); + return """ + { + "oneOf": [ + { + "type": "object", + "properties": { + "action": { "type": "string", "const": "execute_sql" }, + "query": { "type": "string", "description": "SQL statement to execute" }, + "datasourceName": { "type": "string", "description": "Data source name, optional" } + }, + "required": ["action", "query"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { "type": "string", "const": "get_table_name" }, + "text": { "type": "string", "description": "Chinese table name or table description to search, supports single query only" }, + "datasourceName": { "type": "string", "description": "Data source name, optional" } + }, + "required": ["action", "text"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { "type": "string", "const": "get_table_index" }, + "text": { "type": "string", "description": "Table name to search" }, + "datasourceName": { "type": "string", "description": "Data source name, optional" } + }, + "required": ["action", "text"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { "type": "string", "const": "get_table_meta" }, + "text": { "type": "string", "description": "Fuzzy search table description, leave empty to get all tables" }, + "datasourceName": { "type": "string", "description": "Data source name, optional" } + }, + "required": ["action"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { "type": "string", "const": "get_datasource_info" }, + "datasourceName": { "type": "string", "description": "Data source name, leave empty to get all available data sources" } + }, + "required": ["action"], + "additionalProperties": false + } + ] + } + """; } @Override @@ -191,9 +249,8 @@ public String getCurrentToolStateString() { } } - public static DatabaseUseTool getInstance(DataSourceService dataSourceService, ObjectMapper objectMapper, - ToolPromptManager toolPromptManager) { - return new DatabaseUseTool(null, dataSourceService, objectMapper, toolPromptManager); + public static DatabaseUseTool getInstance(DataSourceService dataSourceService, ObjectMapper objectMapper) { + return new DatabaseUseTool(null, dataSourceService, objectMapper); } } diff --git a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/innerStorage/FileMergeTool.java b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/innerStorage/FileMergeTool.java index a7296320e6..f0d3f862f0 100644 --- a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/innerStorage/FileMergeTool.java +++ b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/innerStorage/FileMergeTool.java @@ -16,7 +16,6 @@ package com.alibaba.cloud.ai.example.manus.tool.innerStorage; import com.alibaba.cloud.ai.example.manus.tool.AbstractBaseTool; -import com.alibaba.cloud.ai.example.manus.tool.ToolPromptManager; import com.alibaba.cloud.ai.example.manus.tool.code.ToolExecuteResult; import com.alibaba.cloud.ai.example.manus.tool.filesystem.UnifiedDirectoryManager; import org.slf4j.Logger; @@ -80,11 +79,8 @@ public void setTargetFolder(String targetFolder) { private final UnifiedDirectoryManager directoryManager; - private final ToolPromptManager toolPromptManager; - - public FileMergeTool(UnifiedDirectoryManager directoryManager, ToolPromptManager toolPromptManager) { + public FileMergeTool(UnifiedDirectoryManager directoryManager) { this.directoryManager = directoryManager; - this.toolPromptManager = toolPromptManager; } private static final String TOOL_NAME = "file_merge_tool"; @@ -96,12 +92,37 @@ public String getName() { @Override public String getDescription() { - return toolPromptManager.getToolDescription("file_merge_tool"); + return """ + Merge multiple files into a single file. This tool can combine content from multiple source files and create a merged output file. + """; } @Override public String getParameters() { - return toolPromptManager.getToolParameters("file_merge_tool"); + return """ + { + "type": "object", + "properties": { + "source_files": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of source file paths to merge" + }, + "output_file": { + "type": "string", + "description": "Output file path for the merged content" + }, + "merge_strategy": { + "type": "string", + "enum": ["concatenate", "interleave"], + "description": "Strategy for merging files: concatenate (append all files) or interleave (alternate between files)" + } + }, + "required": ["source_files", "output_file"] + } + """; } @Override diff --git a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/innerStorage/InnerStorageContentTool.java b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/innerStorage/InnerStorageContentTool.java index 3a06002491..180db76d3d 100644 --- a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/innerStorage/InnerStorageContentTool.java +++ b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/innerStorage/InnerStorageContentTool.java @@ -23,7 +23,6 @@ import com.alibaba.cloud.ai.example.manus.recorder.PlanExecutionRecorder; import com.alibaba.cloud.ai.example.manus.tool.AbstractBaseTool; import com.alibaba.cloud.ai.example.manus.tool.code.ToolExecuteResult; -import com.alibaba.cloud.ai.example.manus.tool.ToolPromptManager; import com.alibaba.cloud.ai.example.manus.tool.filesystem.UnifiedDirectoryManager; import com.alibaba.cloud.ai.example.manus.workflow.SummaryWorkflow; @@ -130,14 +129,11 @@ public void setEndLine(Integer endLine) { private final PlanExecutionRecorder planExecutionRecorder; - private final ToolPromptManager toolPromptManager; - public InnerStorageContentTool(UnifiedDirectoryManager directoryManager, SummaryWorkflow summaryWorkflow, - PlanExecutionRecorder planExecutionRecorder, ToolPromptManager toolPromptManager) { + PlanExecutionRecorder planExecutionRecorder) { this.directoryManager = directoryManager; this.summaryWorkflow = summaryWorkflow; this.planExecutionRecorder = planExecutionRecorder; - this.toolPromptManager = toolPromptManager; } private static final String TOOL_NAME = "inner_storage_content_tool"; @@ -149,12 +145,38 @@ public String getName() { @Override public String getDescription() { - return toolPromptManager.getToolDescription("inner_storage_content_tool"); + return """ + Access and manage content stored in the internal storage system. This tool allows you to retrieve, search, and manipulate content that has been stored during plan execution. + """; } @Override public String getParameters() { - return toolPromptManager.getToolParameters("inner_storage_content_tool"); + return """ + { + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": ["get", "search", "list", "delete"], + "description": "Action to perform on inner storage content" + }, + "content_id": { + "type": "string", + "description": "ID of the content to retrieve or manipulate" + }, + "search_query": { + "type": "string", + "description": "Search query for finding content" + }, + "category": { + "type": "string", + "description": "Category filter for content search" + } + }, + "required": ["action"] + } + """; } @Override diff --git a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/pptGenerator/PptGeneratorOperator.java b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/pptGenerator/PptGeneratorOperator.java index 531d13e602..d889f711d6 100644 --- a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/pptGenerator/PptGeneratorOperator.java +++ b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/pptGenerator/PptGeneratorOperator.java @@ -16,7 +16,6 @@ package com.alibaba.cloud.ai.example.manus.tool.pptGenerator; import com.alibaba.cloud.ai.example.manus.tool.AbstractBaseTool; -import com.alibaba.cloud.ai.example.manus.tool.ToolPromptManager; import com.alibaba.cloud.ai.example.manus.tool.code.ToolExecuteResult; import com.alibaba.cloud.ai.example.manus.tool.filesystem.UnifiedDirectoryManager; import com.fasterxml.jackson.databind.ObjectMapper; @@ -35,17 +34,14 @@ public class PptGeneratorOperator extends AbstractBaseTool { private final ObjectMapper objectMapper; - private final ToolPromptManager toolPromptManager; - private final UnifiedDirectoryManager unifiedDirectoryManager; private static final String TOOL_NAME = "ppt_generator_operator"; public PptGeneratorOperator(PptGeneratorService pptGeneratorService, ObjectMapper objectMapper, - ToolPromptManager toolPromptManager, UnifiedDirectoryManager unifiedDirectoryManager) { + UnifiedDirectoryManager unifiedDirectoryManager) { this.pptGeneratorService = pptGeneratorService; this.objectMapper = objectMapper; - this.toolPromptManager = toolPromptManager; this.unifiedDirectoryManager = unifiedDirectoryManager; } @@ -115,12 +111,37 @@ public String getName() { @Override public String getDescription() { - return toolPromptManager.getToolDescription("pptGeneratorOperator"); + return """ + Generate PowerPoint presentations from content. This tool can create PPT files with slides based on provided content and templates. + """; } @Override public String getParameters() { - return toolPromptManager.getToolParameters("pptGeneratorOperator"); + return """ + { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the presentation" + }, + "content": { + "type": "string", + "description": "Content to include in the presentation" + }, + "template": { + "type": "string", + "description": "Template style for the presentation" + }, + "output_path": { + "type": "string", + "description": "Output file path for the generated PPT" + } + }, + "required": ["title", "content"] + } + """; } @Override diff --git a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/textOperator/TextFileOperator.java b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/textOperator/TextFileOperator.java index 3e2a5a1b4f..c0bed52d86 100644 --- a/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/textOperator/TextFileOperator.java +++ b/spring-ai-alibaba-jmanus/src/main/java/com/alibaba/cloud/ai/example/manus/tool/textOperator/TextFileOperator.java @@ -16,7 +16,7 @@ package com.alibaba.cloud.ai.example.manus.tool.textOperator; import com.alibaba.cloud.ai.example.manus.tool.AbstractBaseTool; -import com.alibaba.cloud.ai.example.manus.tool.ToolPromptManager; + import com.alibaba.cloud.ai.example.manus.tool.code.ToolExecuteResult; import com.alibaba.cloud.ai.example.manus.tool.innerStorage.SmartContentSavingService; import com.fasterxml.jackson.core.type.TypeReference; @@ -126,14 +126,11 @@ public void setEndLine(Integer endLine) { private final ObjectMapper objectMapper; - private final ToolPromptManager toolPromptManager; - public TextFileOperator(TextFileService textFileService, SmartContentSavingService innerStorageService, - ObjectMapper objectMapper, ToolPromptManager toolPromptManager) { + ObjectMapper objectMapper) { this.textFileService = textFileService; this.innerStorageService = innerStorageService; this.objectMapper = objectMapper; - this.toolPromptManager = toolPromptManager; } private static final String TOOL_NAME = "text_file_operator"; @@ -529,12 +526,116 @@ public String getName() { @Override public String getDescription() { - return toolPromptManager.getToolDescription("textFileOperator"); + return """ + Perform various operations on text files (including md, html, css, java, etc.). + + Supported operations: + - replace: Replace specific text in file, requires source_text and target_text parameters + - get_text: Get content from specified line range in file, requires start_line and end_line parameters + Limitation: Maximum 500 lines per call, use multiple calls for more content + - get_all_text: Get all content from file + Note: If file content is too long, it will be automatically stored in temporary file and return file path + - append: Append content to file, requires content parameter + - count_words: Count words in current file + + Supported file types include: + - Text files (.txt) + - Markdown files (.md, .markdown) + - Web files (.html, .css, .scss, .sass, .less) + - Programming files (.java, .py, .js, .ts, .cpp, .c, .h, .go, .rs, .php, .rb, .swift, .kt, .scala) + - Configuration files (.json, .xml, .yaml, .yml, .toml, .ini, .conf) + - Documentation files (.rst, .adoc) + """; } @Override public String getParameters() { - return toolPromptManager.getToolParameters("textFileOperator"); + return """ + { + "oneOf": [ + { + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "replace" + }, + "file_path": { + "type": "string", + "description": "File path to operate on" + }, + "source_text": { + "type": "string", + "description": "Text to be replaced" + }, + "target_text": { + "type": "string", + "description": "Replacement text" + } + }, + "required": ["action", "file_path", "source_text", "target_text"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "get_text" + }, + "file_path": { + "type": "string", + "description": "File path to read" + }, + "start_line": { + "type": "integer", + "description": "Starting line number (starts from 1)" + }, + "end_line": { + "type": "integer", + "description": "Ending line number (inclusive). Note: Maximum 500 lines per call, use multiple calls for more content" + } + }, + "required": ["action", "file_path", "start_line", "end_line"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "get_all_text" + }, + "file_path": { + "type": "string", + "description": "File path to read all content. Note: If file is too long, content will be stored in temporary file and return file path" + } + }, + "required": ["action", "file_path"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "action": { + "type": "string", + "const": "append" + }, + "file_path": { + "type": "string", + "description": "File path to operate on" + }, + "content": { + "type": "string", + "description": "Content to append to the file" + } + }, + "required": ["action", "file_path", "content"], + "additionalProperties": false + } + ] + } + """; } @Override diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/bash-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/bash-tool-description.txt deleted file mode 100644 index c2ac3fee62..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/bash-tool-description.txt +++ /dev/null @@ -1,4 +0,0 @@ -Execute bash commands in terminal (current OS: %s). -* Long-running commands: For commands that may run indefinitely, they should be run in background with output redirected to file, e.g.: command = `python3 app.py > server.log 2>&1 &`. -* Interactive commands: If bash command returns exit code `-1`, this means the process is not yet complete. Assistant must send a second terminal call with empty `command` (this will retrieve any additional logs), or can send additional text (set `command` to text) to the running process's STDIN, or can send command=`ctrl+c` to interrupt the process. -* Timeout handling: If command execution result shows "Command timed out. Sending SIGINT to the process", assistant should try to re-run the command in background. diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/bash-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/bash-tool-parameters.txt deleted file mode 100644 index 16b5b7e5c8..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/bash-tool-parameters.txt +++ /dev/null @@ -1,10 +0,0 @@ -{ - "type": "object", - "properties": { - "command": { - "type": "string", - "description": "The bash command to execute. Can be empty to view additional logs when previous exit code is `-1`. Can be `ctrl+c` to interrupt the currently running process." - } - }, - "required": ["command"] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/browser-use-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/browser-use-tool-description.txt deleted file mode 100644 index c58552e205..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/browser-use-tool-description.txt +++ /dev/null @@ -1,20 +0,0 @@ -Interact with web browser to perform various operations such as navigation, element interaction, content extraction and tab management. Prioritize this tool for search-related tasks. - -Supported operations include: -- 'navigate': Visit specific URL -- 'click': Click element by index -- 'input_text': Input text in element -- 'key_enter': Press Enter key -- 'screenshot': Capture screenshot -- 'get_html': Get HTML content of current page -- 'get_text': Get text content of current page -- 'execute_js': Execute JavaScript code -- 'scroll': Scroll page up/down -- 'refresh': Refresh current page -- 'new_tab': Open new tab -- 'close_tab': Close current tab -- 'switch_tab': Switch to specific tab -- 'get_element_position_by_name': Get element position by name -- 'move_to_and_click': Move to coordinates and click - -Note: Browser operations have timeout configuration, default is 30 seconds. diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/browser-use-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/browser-use-tool-parameters.txt deleted file mode 100644 index 15f4d3e67d..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/browser-use-tool-parameters.txt +++ /dev/null @@ -1,218 +0,0 @@ -{ - "oneOf": [ - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "navigate" - }, - "url": { - "type": "string", - "description": "URL to navigate to" - } - }, - "required": ["action", "url"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "click" - }, - "index": { - "type": "integer", - "description": "Element index to click" - } - }, - "required": ["action", "index"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "input_text" - }, - "index": { - "type": "integer", - "description": "Element index to input text" - }, - "text": { - "type": "string", - "description": "Text to input" - } - }, - "required": ["action", "index", "text"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "key_enter" - }, - "index": { - "type": "integer", - "description": "Element index to press enter" - } - }, - "required": ["action", "index"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "screenshot" - } - }, - "required": ["action"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "get_html" - } - }, - "required": ["action"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "get_text" - } - }, - "required": ["action"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "execute_js" - }, - "script": { - "type": "string", - "description": "JavaScript code to execute" - } - }, - "required": ["action", "script"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "scroll" - }, - "direction": { - "type": "string", - "enum": ["up", "down"], - "description": "Scroll direction" - } - }, - "required": ["action", "direction"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "switch_tab" - }, - "tab_id": { - "type": "integer", - "description": "Tab ID to switch to" - } - }, - "required": ["action", "tab_id"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "new_tab" - }, - "url": { - "type": "string", - "description": "URL to open in new tab" - } - }, - "required": ["action", "url"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "close_tab" - } - }, - "required": ["action"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "refresh" - } - }, - "required": ["action"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "get_element_position" - }, - "element_name": { - "type": "string", - "description": "Element name to get position" - } - }, - "required": ["action", "element_name"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "move_to_and_click" - }, - "position_x": { - "type": "integer", - "description": "X coordinate to move to and click" - }, - "position_y": { - "type": "integer", - "description": "Y coordinate to move to and click" - } - }, - "required": ["action", "position_x", "position_y"], - "additionalProperties": false - } - ] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/cron-tool-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/cron-tool-tool-description.txt deleted file mode 100644 index ece5cee581..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/cron-tool-tool-description.txt +++ /dev/null @@ -1 +0,0 @@ -Scheduled task tool that can store scheduled tasks to database. diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/cron-tool-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/cron-tool-tool-parameters.txt deleted file mode 100644 index 34e31c5842..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/cron-tool-tool-parameters.txt +++ /dev/null @@ -1,18 +0,0 @@ -{ - "type": "object", - "properties": { - "cronName": { - "type": "string", - "description": "Scheduled task name" - }, - "cronTime": { - "type": "string", - "description": "Cron format task scheduled execution time (6 digits), example: 0 0 0/2 * * ?" - }, - "planDesc": { - "type": "string", - "description": "Task content to execute, cannot contain time-related information" - } - }, - "required": ["cronTime", "planDesc"] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/data-split-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/data-split-tool-description.txt deleted file mode 100644 index 3b95977a2b..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/data-split-tool-description.txt +++ /dev/null @@ -1,9 +0,0 @@ -Data split tool for MapReduce workflow data preparation phase. -Automatically validates file existence and performs data split processing. -Supports CSV, TSV, TXT and other text format data files. - -Key features: -- File and directory existence validation -- Automatic text file detection and processing -- Task directory structure creation with metadata -- Support for both single files and directories diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/data-split-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/data-split-tool-parameters.txt deleted file mode 100644 index aa936bcd57..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/data-split-tool-parameters.txt +++ /dev/null @@ -1,18 +0,0 @@ -{ - "type": "object", - "properties": { - "file_path": { - "type": "string", - "description": "File or folder path to process" - }, - "terminate_columns": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Column names for termination results, used for structured output" - } - }, - "required": ["file_path"], - "additionalProperties": false -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/database-use-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/database-use-tool-description.txt deleted file mode 100644 index bd3b763a2a..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/database-use-tool-description.txt +++ /dev/null @@ -1,6 +0,0 @@ -Interact with database, execute SQL, table structure, index, health status and other operations. Supported operations include: -- 'execute_sql': Execute SQL statements -- 'get_table_name': Find table names based on table comments -- 'get_table_index': Get table index information -- 'get_table_meta': Get complete metadata of table structure, fields, indexes -- 'get_datasource_info': Get data source information diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/database-use-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/database-use-tool-parameters.txt deleted file mode 100644 index d82a00b85b..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/database-use-tool-parameters.txt +++ /dev/null @@ -1,53 +0,0 @@ -{ - "oneOf": [ - { - "type": "object", - "properties": { - "action": { "type": "string", "const": "execute_sql" }, - "query": { "type": "string", "description": "SQL statement to execute" }, - "datasourceName": { "type": "string", "description": "Data source name, optional" } - }, - "required": ["action", "query"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { "type": "string", "const": "get_table_name" }, - "text": { "type": "string", "description": "Chinese table name or table description to search, supports single query only" }, - "datasourceName": { "type": "string", "description": "Data source name, optional" } - }, - "required": ["action", "text"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { "type": "string", "const": "get_table_index" }, - "text": { "type": "string", "description": "Table name to search" }, - "datasourceName": { "type": "string", "description": "Data source name, optional" } - }, - "required": ["action", "text"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { "type": "string", "const": "get_table_meta" }, - "text": { "type": "string", "description": "Fuzzy search table description, leave empty to get all tables" }, - "datasourceName": { "type": "string", "description": "Data source name, optional" } - }, - "required": ["action"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { "type": "string", "const": "get_datasource_info" }, - "datasourceName": { "type": "string", "description": "Data source name, leave empty to get all available data sources" } - }, - "required": ["action"], - "additionalProperties": false - } - ] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/doc-loader-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/doc-loader-tool-description.txt deleted file mode 100644 index 8d1e7ef27a..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/doc-loader-tool-description.txt +++ /dev/null @@ -1,3 +0,0 @@ -Get the content information of a local file at a specified path. -Use this tool when you want to get some related information asked by the user. -This tool accepts the file path and gets the related information content. diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/doc-loader-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/doc-loader-tool-parameters.txt deleted file mode 100644 index 951a401e47..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/doc-loader-tool-parameters.txt +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "object", - "properties": { - "file_type": { - "type": "string", - "description": "(required) File type, only support pdf file." - }, - "file_path": { - "type": "string", - "description": "(required) Get the absolute path of the file from the user request." - } - }, - "required": ["file_type", "file_path"] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/file-merge-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/file-merge-tool-description.txt deleted file mode 100644 index cc6d972bb7..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/file-merge-tool-description.txt +++ /dev/null @@ -1,2 +0,0 @@ -File merge tool for merging single files into specified target folders. -Each call merges one file to the target folder, supports fuzzy filename matching. diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/file-merge-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/file-merge-tool-parameters.txt deleted file mode 100644 index 22734beba5..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/file-merge-tool-parameters.txt +++ /dev/null @@ -1,20 +0,0 @@ -{ - "type": "object", - "properties": { - "action": { - "type": "string", - "enum": ["merge_file"], - "description": "Operation type, currently supports merge_file" - }, - "file_name": { - "type": "string", - "description": "Filename to merge (supports fuzzy matching)" - }, - "target_folder": { - "type": "string", - "description": "Target folder path where the file will be copied" - } - }, - "required": ["action", "file_name", "target_folder"], - "additionalProperties": false -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/finalize-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/finalize-tool-description.txt deleted file mode 100644 index e296b7725d..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/finalize-tool-description.txt +++ /dev/null @@ -1,9 +0,0 @@ -Finalize tool for MapReduce workflow output processing. -Supports copying the reduce output file to a new file with user-specified name. -Supported operations: -- export: Copy the reduce output file to a new file with the specified name in the same directory. - -This tool is specifically designed for finalizing MapReduce workflow results by: -- Creating a final output file with a meaningful name -- Preserving the original reduce output file -- Ensuring the final result is properly named and accessible diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/finalize-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/finalize-tool-parameters.txt deleted file mode 100644 index 92fd7ac228..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/finalize-tool-parameters.txt +++ /dev/null @@ -1,15 +0,0 @@ -{ - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "export" - }, - "new_file_name": { - "type": "string", - "description": "New file name (with extension), used to save the final output result" - } - }, - "required": ["action", "new_file_name"], - "additionalProperties": false -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/form-input-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/form-input-tool-description.txt deleted file mode 100644 index aac784d2f3..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/form-input-tool-description.txt +++ /dev/null @@ -1,5 +0,0 @@ -Provides a labeled multi-input form tool. - -LLM can use this tool to let users submit 0 or more input items (each with label and content), along with filling instructions. -Allows users to submit 0 input items. -Suitable for scenarios requiring structured input and can also be used when the model needs to wait for user input before continuing. diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/form-input-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/form-input-tool-parameters.txt deleted file mode 100644 index f559f9ff68..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/form-input-tool-parameters.txt +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "object", - "properties": { - "inputs": { - "type": "array", - "description": "List of input items, each containing label and value fields", - "items": { - "type": "object", - "properties": { - "label": { "type": "string", "description": "Input item label" }, - "value": { "type": "string", "description": "Input content" } - }, - "required": ["label"] - } - }, - "description": { - "type": "string", - "description": "Instructions on how to fill these input items" - } - }, - "required": [ "description"] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/inner-storage-content-tool-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/inner-storage-content-tool-tool-description.txt deleted file mode 100644 index 1175ef567c..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/inner-storage-content-tool-tool-description.txt +++ /dev/null @@ -1,6 +0,0 @@ -Internal storage content retrieval tool specialized for intelligent content extraction and structured output. -Intelligent content extraction mode: Get detailed content based on file name, **must provide** query_key and columns parameters for intelligent extraction and structured output - -Supports two operation modes: -1. get_content: Get content from single file (exact filename match or relative path) -2. get_folder_content: Get content from all files in specified folder diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/inner-storage-content-tool-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/inner-storage-content-tool-tool-parameters.txt deleted file mode 100644 index 350ca4aea7..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/inner-storage-content-tool-tool-parameters.txt +++ /dev/null @@ -1,58 +0,0 @@ -{ - "oneOf": [ - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "get_content", - "description": "Get content from single file" - }, - "file_name": { - "type": "string", - "description": "Filename (with extension) or relative path, supports exact matching" - }, - "query_key": { - "type": "string", - "description": "Related questions or content keywords to extract, must be provided" - }, - "columns": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Column names for return results, used for structured output, must be provided. The returned result can be a list" - } - }, - "required": ["action", "file_name", "query_key", "columns"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "get_folder_content", - "description": "Get content from all files in specified folder" - }, - "folder_name": { - "type": "string", - "description": "Folder name or relative path" - }, - "query_key": { - "type": "string", - "description": "Related questions or content keywords to extract, must be provided" - }, - "columns": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Column names for return results, used for structured output, must be provided. The returned result can be a list" - } - }, - "required": ["action", "folder_name", "query_key", "columns"], - "additionalProperties": false - } - ] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/map-output-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/map-output-tool-description.txt deleted file mode 100644 index b7c539b831..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/map-output-tool-description.txt +++ /dev/null @@ -1,10 +0,0 @@ -Map output recording tool for MapReduce workflow. -Accept content after Map phase processing completion, automatically generate filename and create output file. -Record task status and manage structured data output. - -**Important Parameter Description:** -- task_id: String, task ID identifier for identifying the currently processing Map task (required) -- has_value: Boolean value indicating whether there is valid data - - If no valid data is found, set to false - - If there is data to output, set to true -- data: Must provide data when has_value is true diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/map-output-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/map-output-tool-parameters.txt deleted file mode 100644 index 4c3b9365cd..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/map-output-tool-parameters.txt +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "object", - "properties": { - "task_id": { - "type": "string", - "description": "Task ID identifier for identifying the currently processing Map task" - }, - "has_value": { - "type": "boolean", - "description": "Whether there is valid data. Set to false if no valid data is found, set to true when there is data" - }, - "data": { - "type": "array", - "items": { - "type": "array", - "items": {"type": "string"} - }, - "description": "data row list (only required when has_value is true)" - } - }, - "required": ["task_id", "has_value"], - "additionalProperties": false -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/mapreduce-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/mapreduce-tool-description.txt deleted file mode 100644 index 8818c800f2..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/mapreduce-tool-description.txt +++ /dev/null @@ -1 +0,0 @@ -MapReduce planning tool for managing complex task execution plans supporting both sequential and MapReduce modes, with MapReduce mode including three phases: Data Preparation, Map, and Reduce diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/mapreduce-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/mapreduce-tool-parameters.txt deleted file mode 100644 index 457fb331fa..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/mapreduce-tool-parameters.txt +++ /dev/null @@ -1,97 +0,0 @@ -{ - "type": "object", - "properties": { - "command": { - "description": "MapReducePlanningTool accepts JSON format input to create execution plans. Required parameters include command (fixed as 'create'), planId as unique identifier, title as plan title, steps array containing execution nodes. Each node has a type field specifying either sequential (sequential execution) or mapreduce (distributed processing). Sequential nodes contain steps array, mapreduce nodes contain dataPreparedSteps (data preparation phase, serial execution), mapSteps (Map phase, parallel execution) and reduceSteps (Reduce phase, serial execution) arrays. Each step object contains stepRequirement describing specific task content, suggest using square brackets to indicate agent type. The tool automatically adds type prefixes to steps, supports combining multiple node types in the same plan to form complex workflows. All JSON keys must be in proper English format.", - "enum": [ - "create" - ], - "type": "string" - }, - "planId": { - "description": "Unique identifier for the plan", - "type": "string" - }, - "title": { - "description": "Title of the plan", - "type": "string" - }, - "steps": { - "description": "List of plan steps, supporting both sequential and MapReduce node types", - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "description": "Node type: sequential (sequential) or mapreduce (MapReduce)", - "enum": ["sequential", "mapreduce"], - "type": "string" - }, - "steps": { - "description": "Step list for sequential nodes", - "type": "array", - "items": { - "type": "object", - "properties": { - "stepRequirement": { - "description": "Step requirement description", - "type": "string" - } - }, - "required": ["stepRequirement"] - } - }, - "dataPreparedSteps": { - "description": "Data preparation phase step list for MapReduce nodes, executed serially before Map phase, used for data preprocessing, splitting, cleaning and other preparation work", - "type": "array", - "items": { - "type": "object", - "properties": { - "stepRequirement": { - "description": "Data preparation step requirement description", - "type": "string" - } - }, - "required": ["stepRequirement"] - } - }, - "mapSteps": { - "description": "Map phase step list for MapReduce nodes, executed in parallel after data preparation phase", - "type": "array", - "items": { - "type": "object", - "properties": { - "stepRequirement": { - "description": "Map step requirement description", - "type": "string" - } - }, - "required": ["stepRequirement"] - } - }, - "reduceSteps": { - "description": "Reduce phase step list for MapReduce nodes", - "type": "array", - "items": { - "type": "object", - "properties": { - "stepRequirement": { - "description": "Reduce step requirement description", - "type": "string" - } - }, - "required": ["stepRequirement"] - } - } - }, - "required": ["type"] - } - } - }, - "required": [ - "command", - "planId", - "title", - "steps" - ] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/ppt-generator-operator-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/ppt-generator-operator-tool-description.txt deleted file mode 100644 index 0b10363032..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/ppt-generator-operator-tool-description.txt +++ /dev/null @@ -1,12 +0,0 @@ -Tool for creating and generating PPT files. - -Supported operations: -- create: Create a new PPT file, requires output_path and title parameters, subtitle and slide_contents are optional - -Supported PPT file types: -- .pptx -- .ppt - -When creating PPT, you can set: -- Title and subtitle -- Multiple slides, each slide can contain title, content and image path diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/ppt-generator-operator-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/ppt-generator-operator-tool-parameters.txt deleted file mode 100644 index 5482d0ac9c..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/ppt-generator-operator-tool-parameters.txt +++ /dev/null @@ -1,50 +0,0 @@ -{ - "oneOf": [ - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "create" - }, - "output_path": { - "type": "string", - "description": "Path to save the generated PPT file" - }, - "title": { - "type": "string", - "description": "Title of the PPT" - }, - "subtitle": { - "type": "string", - "description": "Subtitle of the PPT (optional)" - }, - "slide_contents": { - "type": "array", - "description": "List of slide contents (optional)", - "items": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "Slide title" - }, - "content": { - "type": "string", - "description": "Slide content" - }, - "image_path": { - "type": "string", - "description": "Image path in the slide (optional)" - } - }, - "required": ["title", "content"], - "additionalProperties": false - } - } - }, - "required": ["action", "output_path", "title"], - "additionalProperties": false - } - ] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/python-execute-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/python-execute-tool-description.txt deleted file mode 100644 index 1b1f332af5..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/python-execute-tool-description.txt +++ /dev/null @@ -1 +0,0 @@ -Executes Python code string. Note: Only print outputs are visible, function return values are not captured. Use print statements to see results. diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/python-execute-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/python-execute-tool-parameters.txt deleted file mode 100644 index 7a13d21b6c..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/python-execute-tool-parameters.txt +++ /dev/null @@ -1,10 +0,0 @@ -{ - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "The Python code to execute." - } - }, - "required": ["code"] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/reduce-operation-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/reduce-operation-tool-description.txt deleted file mode 100644 index a6a6137809..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/reduce-operation-tool-description.txt +++ /dev/null @@ -1,11 +0,0 @@ -Reduce operation tool for MapReduce workflow file manipulation. -Aggregates and merges data from multiple Map tasks and generates final consolidated output. - -**Important Parameter Description:** -- has_value: Boolean value indicating whether there is valid data to write - - If no valid data is found, set to false - - If there is data to output, set to true -- data: Must provide data when has_value is true - -**IMPORTANT**: Tool will automatically terminate after operation completion. -Please complete all content output in a single call. diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/reduce-operation-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/reduce-operation-tool-parameters.txt deleted file mode 100644 index 378f8b4e4b..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/reduce-operation-tool-parameters.txt +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "object", - "properties": { - "has_value": { - "type": "boolean", - "description": "Whether there is valid data to write. Set to false if no valid data is found, set to true when there is data" - }, - "data": { - "type": "array", - "items": { - "type": "array", - "items": {"type": "string"} - }, - "description": "data row list (only required when has_value is true)" - } - }, - "required": ["has_value"], - "additionalProperties": false -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/terminate-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/terminate-tool-description.txt deleted file mode 100644 index 2973e1a41b..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/terminate-tool-description.txt +++ /dev/null @@ -1,2 +0,0 @@ -Terminate the current execution step with structured data. -Provide data in JSON format with 'columns' array and 'data' array containing rows of values. diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/terminate-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/terminate-tool-parameters.txt deleted file mode 100644 index cca7a16004..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/terminate-tool-parameters.txt +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "object", - "properties": { - "columns": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Column names for the data structure" - }, - "data": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string" - } - }, - "description": "Data rows, each row should match the columns structure" - } - }, - "required": ["columns", "data"], - "additionalProperties": false -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/textfileoperator-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/textfileoperator-tool-description.txt deleted file mode 100644 index eb959f47d7..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/textfileoperator-tool-description.txt +++ /dev/null @@ -1,18 +0,0 @@ -Perform various operations on text files (including md, html, css, java, etc.). - -Supported operations: -- replace: Replace specific text in file, requires source_text and target_text parameters -- get_text: Get content from specified line range in file, requires start_line and end_line parameters - Limitation: Maximum 500 lines per call, use multiple calls for more content -- get_all_text: Get all content from file - Note: If file content is too long, it will be automatically stored in temporary file and return file path -- append: Append content to file, requires content parameter -- count_words: Count words in current file - -Supported file types include: -- Text files (.txt) -- Markdown files (.md, .markdown) -- Web files (.html, .css, .scss, .sass, .less) -- Programming files (.java, .py, .js, .ts, .cpp, .c, .h, .go, .rs, .php, .rb, .swift, .kt, .scala) -- Configuration files (.json, .xml, .yaml, .yml, .toml, .ini, .conf) -- Documentation files (.rst, .adoc) diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/textfileoperator-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/textfileoperator-tool-parameters.txt deleted file mode 100644 index 9c628adb91..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/en/tool/textfileoperator-tool-parameters.txt +++ /dev/null @@ -1,84 +0,0 @@ -{ - "oneOf": [ - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "replace" - }, - "file_path": { - "type": "string", - "description": "File path to operate on" - }, - "source_text": { - "type": "string", - "description": "Text to be replaced" - }, - "target_text": { - "type": "string", - "description": "Replacement text" - } - }, - "required": ["action", "file_path", "source_text", "target_text"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "get_text" - }, - "file_path": { - "type": "string", - "description": "File path to read" - }, - "start_line": { - "type": "integer", - "description": "Starting line number (starts from 1)" - }, - "end_line": { - "type": "integer", - "description": "Ending line number (inclusive). Note: Maximum 500 lines per call, use multiple calls for more content" - } - }, - "required": ["action", "file_path", "start_line", "end_line"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "get_all_text" - }, - "file_path": { - "type": "string", - "description": "File path to read all content. Note: If file is too long, content will be stored in temporary file and return file path" - } - }, - "required": ["action", "file_path"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "append" - }, - "file_path": { - "type": "string", - "description": "File path to operate on" - }, - "content": { - "type": "string", - "description": "Content to append to the file" - } - }, - "required": ["action", "file_path", "content"], - "additionalProperties": false - } - ] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/bash-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/bash-tool-description.txt deleted file mode 100644 index 4b9cc79a06..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/bash-tool-description.txt +++ /dev/null @@ -1,4 +0,0 @@ -在终端中执行bash命令(当前操作系统:%s)。 -* 长时间运行的命令:对于可能无限期运行的命令,应该在后台运行并将输出重定向到文件,例如:command = `python3 app.py > server.log 2>&1 &`。 -* 交互式命令:如果bash命令返回退出代码`-1`,这意味着进程尚未完成。助手必须发送第二个终端调用,使用空的`command`(这将检索任何额外的日志),或者可以发送额外的文本(将`command`设置为文本)到正在运行的进程的STDIN,或者可以发送command=`ctrl+c`来中断进程。 -* 超时处理:如果命令执行结果显示"命令超时。向进程发送SIGINT",助手应该尝试在后台重新运行命令。 diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/bash-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/bash-tool-parameters.txt deleted file mode 100644 index 6815ca8d65..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/bash-tool-parameters.txt +++ /dev/null @@ -1,10 +0,0 @@ -{ - "type": "object", - "properties": { - "command": { - "type": "string", - "description": "要执行的bash命令。当前一个退出代码为`-1`时,可以为空以查看额外的日志。可以是`ctrl+c`来中断当前正在运行的进程。" - } - }, - "required": ["command"] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/browser-use-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/browser-use-tool-description.txt deleted file mode 100644 index 117e5fbed4..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/browser-use-tool-description.txt +++ /dev/null @@ -1,20 +0,0 @@ -与网页浏览器交互,执行各种操作,如导航、元素交互、内容提取和标签页管理。优先使用此工具进行搜索相关任务。 - -支持的操作包括: -- 'navigate': 访问指定URL -- 'click': 通过索引点击元素 -- 'input_text': 在元素中输入文本 -- 'key_enter': 按回车键 -- 'screenshot': 截取屏幕截图 -- 'get_html': 获取当前页面的HTML内容 -- 'get_text': 获取当前页面的文本内容 -- 'execute_js': 执行JavaScript代码 -- 'scroll': 页面上下滚动 -- 'refresh': 刷新当前页面 -- 'new_tab': 打开新标签页 -- 'close_tab': 关闭当前标签页 -- 'switch_tab': 切换到指定标签页 -- 'get_element_position_by_name': 通过名称获取元素位置 -- 'move_to_and_click': 移动到坐标并点击 - -注意:浏览器操作有超时配置,默认为30秒。 diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/browser-use-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/browser-use-tool-parameters.txt deleted file mode 100644 index 6578c081a6..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/browser-use-tool-parameters.txt +++ /dev/null @@ -1,218 +0,0 @@ -{ - "oneOf": [ - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "navigate" - }, - "url": { - "type": "string", - "description": "要导航到的URL" - } - }, - "required": ["action", "url"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "click" - }, - "index": { - "type": "integer", - "description": "要点击的元素索引" - } - }, - "required": ["action", "index"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "input_text" - }, - "index": { - "type": "integer", - "description": "要输入文本的元素索引" - }, - "text": { - "type": "string", - "description": "要输入的文本" - } - }, - "required": ["action", "index", "text"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "key_enter" - }, - "index": { - "type": "integer", - "description": "要按回车键的元素索引" - } - }, - "required": ["action", "index"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "screenshot" - } - }, - "required": ["action"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "get_html" - } - }, - "required": ["action"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "get_text" - } - }, - "required": ["action"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "execute_js" - }, - "script": { - "type": "string", - "description": "要执行的JavaScript代码" - } - }, - "required": ["action", "script"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "scroll" - }, - "direction": { - "type": "string", - "enum": ["up", "down"], - "description": "滚动方向" - } - }, - "required": ["action", "direction"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "switch_tab" - }, - "tab_id": { - "type": "integer", - "description": "要切换到的标签页ID" - } - }, - "required": ["action", "tab_id"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "new_tab" - }, - "url": { - "type": "string", - "description": "在新标签页中打开的URL" - } - }, - "required": ["action", "url"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "close_tab" - } - }, - "required": ["action"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "refresh" - } - }, - "required": ["action"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "get_element_position" - }, - "element_name": { - "type": "string", - "description": "要获取位置的元素名称" - } - }, - "required": ["action", "element_name"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "move_to_and_click" - }, - "position_x": { - "type": "integer", - "description": "要移动并点击的X坐标" - }, - "position_y": { - "type": "integer", - "description": "要移动并点击的Y坐标" - } - }, - "required": ["action", "position_x", "position_y"], - "additionalProperties": false - } - ] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/cron-tool-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/cron-tool-tool-description.txt deleted file mode 100644 index fd6d77cec5..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/cron-tool-tool-description.txt +++ /dev/null @@ -1 +0,0 @@ -定时任务工具,可以将定时任务存储到数据库中。 diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/cron-tool-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/cron-tool-tool-parameters.txt deleted file mode 100644 index f643103fb1..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/cron-tool-tool-parameters.txt +++ /dev/null @@ -1,18 +0,0 @@ -{ - "type": "object", - "properties": { - "cronName": { - "type": "string", - "description": "定时任务名称" - }, - "cronTime": { - "type": "string", - "description": "Cron格式的任务定时执行时间(6位数),示例:0 0 0/2 * * ?" - }, - "planDesc": { - "type": "string", - "description": "要执行的任务内容,不能包含时间相关信息" - } - }, - "required": ["cronTime", "planDesc"] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/data-split-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/data-split-tool-description.txt deleted file mode 100644 index 712e623b67..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/data-split-tool-description.txt +++ /dev/null @@ -1,9 +0,0 @@ -MapReduce工作流数据准备阶段的数据分割工具。 -自动验证文件存在性并执行数据分割处理。 -支持CSV、TSV、TXT和其他文本格式数据文件。 - -主要功能: -- 文件和目录存在性验证 -- 自动文本文件检测和处理 -- 创建带有元数据的任务目录结构 -- 支持单个文件和目录 diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/data-split-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/data-split-tool-parameters.txt deleted file mode 100644 index a39ffaf16d..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/data-split-tool-parameters.txt +++ /dev/null @@ -1,18 +0,0 @@ -{ - "type": "object", - "properties": { - "file_path": { - "type": "string", - "description": "要处理的文件或文件夹路径" - }, - "terminate_columns": { - "type": "array", - "items": { - "type": "string" - }, - "description": "终止结果的列名,用于结构化输出" - } - }, - "required": ["file_path"], - "additionalProperties": false -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/database-use-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/database-use-tool-description.txt deleted file mode 100644 index b9f996dc2c..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/database-use-tool-description.txt +++ /dev/null @@ -1,6 +0,0 @@ -与数据库交互,执行SQL、表结构、索引、健康状态等操作。支持的操作包括: -- 'execute_sql': 执行SQL语句 -- 'get_table_name': 根据表注释查找表名 -- 'get_table_index': 获取表索引信息 -- 'get_table_meta': 获取表结构、字段、索引的完整元数据 -- 'get_datasource_info': 获取数据源信息 diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/database-use-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/database-use-tool-parameters.txt deleted file mode 100644 index 425ef67743..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/database-use-tool-parameters.txt +++ /dev/null @@ -1,53 +0,0 @@ -{ - "oneOf": [ - { - "type": "object", - "properties": { - "action": { "type": "string", "const": "execute_sql" }, - "query": { "type": "string", "description": "要执行的SQL语句" }, - "datasourceName": { "type": "string", "description": "数据源名称,可选" } - }, - "required": ["action", "query"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { "type": "string", "const": "get_table_name" }, - "text": { "type": "string", "description": "要搜索的中文表名或表描述,仅支持单个查询" }, - "datasourceName": { "type": "string", "description": "数据源名称,可选" } - }, - "required": ["action", "text"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { "type": "string", "const": "get_table_index" }, - "text": { "type": "string", "description": "要搜索的表名" }, - "datasourceName": { "type": "string", "description": "数据源名称,可选" } - }, - "required": ["action", "text"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { "type": "string", "const": "get_table_meta" }, - "text": { "type": "string", "description": "模糊搜索表描述,留空获取所有表" }, - "datasourceName": { "type": "string", "description": "数据源名称,可选" } - }, - "required": ["action"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { "type": "string", "const": "get_datasource_info" }, - "datasourceName": { "type": "string", "description": "数据源名称,留空获取所有可用数据源" } - }, - "required": ["action"], - "additionalProperties": false - } - ] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/doc-loader-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/doc-loader-tool-description.txt deleted file mode 100644 index cc2d9ed552..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/doc-loader-tool-description.txt +++ /dev/null @@ -1,3 +0,0 @@ -获取指定路径本地文件的内容信息。 -当您想要获取用户询问的相关信息时使用此工具。 -此工具接受文件路径并获取相关信息内容。 diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/doc-loader-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/doc-loader-tool-parameters.txt deleted file mode 100644 index f03865b9b9..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/doc-loader-tool-parameters.txt +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "object", - "properties": { - "file_type": { - "type": "string", - "description": "(必需)文件类型,仅支持pdf文件。" - }, - "file_path": { - "type": "string", - "description": "(必需)从用户请求中获取文件的绝对路径。" - } - }, - "required": ["file_type", "file_path"] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/file-merge-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/file-merge-tool-description.txt deleted file mode 100644 index fa93567d5f..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/file-merge-tool-description.txt +++ /dev/null @@ -1,2 +0,0 @@ -文件合并工具,用于将单个文件合并到指定的目标文件夹中。 -每次调用将一个文件合并到目标文件夹,支持模糊文件名匹配。 diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/file-merge-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/file-merge-tool-parameters.txt deleted file mode 100644 index 9cb3d96d68..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/file-merge-tool-parameters.txt +++ /dev/null @@ -1,20 +0,0 @@ -{ - "type": "object", - "properties": { - "action": { - "type": "string", - "enum": ["merge_file"], - "description": "操作类型,目前支持merge_file" - }, - "file_name": { - "type": "string", - "description": "要合并的文件名(支持模糊匹配)" - }, - "target_folder": { - "type": "string", - "description": "文件将被复制到的目标文件夹路径" - } - }, - "required": ["action", "file_name", "target_folder"], - "additionalProperties": false -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/finalize-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/finalize-tool-description.txt deleted file mode 100644 index e5bd6b0231..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/finalize-tool-description.txt +++ /dev/null @@ -1,9 +0,0 @@ -MapReduce工作流输出处理的完成工具。 -支持将reduce输出文件复制到用户指定名称的新文件。 -支持的操作: -- export:将reduce输出文件复制到同一目录中指定名称的新文件。 - -此工具专门设计用于完成MapReduce工作流结果: -- 创建具有有意义名称的最终输出文件 -- 保留原始reduce输出文件 -- 确保最终结果正确命名且可访问 diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/finalize-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/finalize-tool-parameters.txt deleted file mode 100644 index 5338fee3bc..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/finalize-tool-parameters.txt +++ /dev/null @@ -1,15 +0,0 @@ -{ - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "export" - }, - "new_file_name": { - "type": "string", - "description": "新文件名(带扩展名),用于保存最终输出结果" - } - }, - "required": ["action", "new_file_name"], - "additionalProperties": false -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/form-input-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/form-input-tool-description.txt deleted file mode 100644 index 6214d5f77d..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/form-input-tool-description.txt +++ /dev/null @@ -1,5 +0,0 @@ -提供一个带标签的多输入项表单工具。 - -LLM可通过本工具 让用户 提交0个或多个输入项(每项有label和内容),并附带填写说明。 -允许用户提交0个输入项。 -适用于需要结构化输入的场景也可以用于模型需要等待用户输入然后再继续的场景. diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/form-input-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/form-input-tool-parameters.txt deleted file mode 100644 index 539432d59d..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/form-input-tool-parameters.txt +++ /dev/null @@ -1,22 +0,0 @@ -{ - "type": "object", - "properties": { - "inputs": { - "type": "array", - "description": "输入项列表,每项包含 label 和 value 字段", - "items": { - "type": "object", - "properties": { - "label": { "type": "string", "description": "输入项标签" }, - "value": { "type": "string", "description": "输入内容" } - }, - "required": ["label"] - } - }, - "description": { - "type": "string", - "description": "如何填写这些输入项的说明" - } - }, - "required": [ "description"] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/inner-storage-content-tool-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/inner-storage-content-tool-tool-description.txt deleted file mode 100644 index 00297fd707..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/inner-storage-content-tool-tool-description.txt +++ /dev/null @@ -1,6 +0,0 @@ -内部存储内容检索工具,专门用于智能内容提取和结构化输出。 -智能内容提取模式:根据文件名获取详细内容,**必须提供** query_key 和 columns 参数进行智能提取和结构化输出 - -支持两种操作模式: -1. get_content:从单个文件获取内容(精确文件名匹配或相对路径) -2. get_folder_content:从指定文件夹中的所有文件获取内容 diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/inner-storage-content-tool-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/inner-storage-content-tool-tool-parameters.txt deleted file mode 100644 index 59dce9f899..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/inner-storage-content-tool-tool-parameters.txt +++ /dev/null @@ -1,58 +0,0 @@ -{ - "oneOf": [ - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "get_content", - "description": "从单个文件获取内容" - }, - "file_name": { - "type": "string", - "description": "文件名(带扩展名)或相对路径,支持精确匹配" - }, - "query_key": { - "type": "string", - "description": "要提取的相关问题或内容关键词,必须提供" - }, - "columns": { - "type": "array", - "items": { - "type": "string" - }, - "description": "返回结果的列名,用于结构化输出,必须提供。返回结果可以是列表" - } - }, - "required": ["action", "file_name", "query_key", "columns"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "get_folder_content", - "description": "从指定文件夹中的所有文件获取内容" - }, - "folder_name": { - "type": "string", - "description": "文件夹名称或相对路径" - }, - "query_key": { - "type": "string", - "description": "要提取的相关问题或内容关键词,必须提供" - }, - "columns": { - "type": "array", - "items": { - "type": "string" - }, - "description": "返回结果的列名,用于结构化输出,必须提供。返回结果可以是列表" - } - }, - "required": ["action", "folder_name", "query_key", "columns"], - "additionalProperties": false - } - ] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/map-output-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/map-output-tool-description.txt deleted file mode 100644 index 7d6630db41..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/map-output-tool-description.txt +++ /dev/null @@ -1,10 +0,0 @@ -MapReduce工作流的Map输出记录工具。 -接受Map阶段处理完成后的内容,自动生成文件名并创建输出文件。 -记录任务状态并管理结构化数据输出。 - -**重要参数说明:** -- task_id:字符串,用于标识当前正在处理的Map任务的任务ID标识符(必需) -- has_value:布尔值,表示是否有有效数据 - - 如果没有找到有效数据,设置为false - - 如果有数据要输出,设置为true -- data:当has_value为true时必须提供数据 diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/map-output-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/map-output-tool-parameters.txt deleted file mode 100644 index 68e49f420d..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/map-output-tool-parameters.txt +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "object", - "properties": { - "task_id": { - "type": "string", - "description": "用于标识当前正在处理的Map任务的任务ID标识符" - }, - "has_value": { - "type": "boolean", - "description": "是否有有效数据。如果没有找到有效数据设置为false,有数据时设置为true" - }, - "data": { - "type": "array", - "items": { - "type": "array", - "items": {"type": "string"} - }, - "description": "数据行列表(仅在has_value为true时需要)" - } - }, - "required": ["task_id", "has_value"], - "additionalProperties": false -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/mapreduce-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/mapreduce-tool-description.txt deleted file mode 100644 index e933ee0ab7..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/mapreduce-tool-description.txt +++ /dev/null @@ -1 +0,0 @@ -MapReduce计划工具,用于管理支持顺序和MapReduce模式的复杂任务执行计划,MapReduce模式包含数据准备(DataPrepared)、Map和Reduce三个阶段 diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/mapreduce-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/mapreduce-tool-parameters.txt deleted file mode 100644 index 0fe56b95d4..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/mapreduce-tool-parameters.txt +++ /dev/null @@ -1,97 +0,0 @@ -{ - "type": "object", - "properties": { - "command": { - "description": "MapReducePlanningTool 接受JSON格式输入创建执行计划,必需参数包括command固定为create、planId作为唯一标识、title作为计划标题、steps数组包含执行节点,每个节点有type字段指定sequential顺序执行或mapreduce分布式处理两种类型,sequential节点包含steps数组,mapreduce节点包含dataPreparedSteps(数据准备阶段,串行执行)、mapSteps(Map阶段,并行执行)和reduceSteps(Reduce阶段,串行执行)数组,每个步骤对象包含stepRequirement描述具体任务内容建议用方括号标明代理类型,工具会自动为步骤添加类型前缀,支持在同一计划中组合多种节点类型形成复杂工作流。 所有的jsonkey都必须是完全符合要求的英文", - "enum": [ - "create" - ], - "type": "string" - }, - "planId": { - "description": "计划的唯一标识符", - "type": "string" - }, - "title": { - "description": "计划的标题", - "type": "string" - }, - "steps": { - "description": "计划步骤列表,支持顺序和MapReduce两种节点类型", - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "description": "节点类型:sequential(顺序)、mapreduce(MapReduce)", - "enum": ["sequential", "mapreduce"], - "type": "string" - }, - "steps": { - "description": "顺序节点的步骤列表", - "type": "array", - "items": { - "type": "object", - "properties": { - "stepRequirement": { - "description": "步骤要求描述", - "type": "string" - } - }, - "required": ["stepRequirement"] - } - }, - "dataPreparedSteps": { - "description": "MapReduce节点的数据准备阶段步骤列表,在Map阶段之前串行执行,用于数据预处理、分割、清洗等准备工作", - "type": "array", - "items": { - "type": "object", - "properties": { - "stepRequirement": { - "description": "数据准备步骤要求描述", - "type": "string" - } - }, - "required": ["stepRequirement"] - } - }, - "mapSteps": { - "description": "MapReduce节点的Map阶段步骤列表,在数据准备阶段之后并行执行", - "type": "array", - "items": { - "type": "object", - "properties": { - "stepRequirement": { - "description": "Map步骤要求描述", - "type": "string" - } - }, - "required": ["stepRequirement"] - } - }, - "reduceSteps": { - "description": "MapReduce节点的Reduce阶段步骤列表", - "type": "array", - "items": { - "type": "object", - "properties": { - "stepRequirement": { - "description": "Reduce步骤要求描述", - "type": "string" - } - }, - "required": ["stepRequirement"] - } - } - }, - "required": ["type"] - } - } - }, - "required": [ - "command", - "planId", - "title", - "steps" - ] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/ppt-generator-operator-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/ppt-generator-operator-tool-description.txt deleted file mode 100644 index 902de42bf3..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/ppt-generator-operator-tool-description.txt +++ /dev/null @@ -1,12 +0,0 @@ -用于创建和生成PPT文件的工具。 - -支持的操作: -- create:创建新的PPT文件,需要output_path、title参数,可选subtitle和slide_contents参数 - -支持的PPT文件类型包括: -- .pptx -- .ppt - -创建PPT时可以设置: -- 标题和副标题 -- 多张幻灯片,每张幻灯片可包含标题、内容和图片路径 diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/ppt-generator-operator-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/ppt-generator-operator-tool-parameters.txt deleted file mode 100644 index fe26285f27..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/ppt-generator-operator-tool-parameters.txt +++ /dev/null @@ -1,50 +0,0 @@ -{ - "oneOf": [ - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "create" - }, - "output_path": { - "type": "string", - "description": "生成的PPT文件保存路径" - }, - "title": { - "type": "string", - "description": "PPT的标题" - }, - "subtitle": { - "type": "string", - "description": "PPT的副标题(可选)" - }, - "slide_contents": { - "type": "array", - "description": "幻灯片内容列表(可选)", - "items": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "幻灯片标题" - }, - "content": { - "type": "string", - "description": "幻灯片内容" - }, - "image_path": { - "type": "string", - "description": "幻灯片中的图片路径(可选)" - } - }, - "required": ["title", "content"], - "additionalProperties": false - } - } - }, - "required": ["action", "output_path", "title"], - "additionalProperties": false - } - ] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/python-execute-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/python-execute-tool-description.txt deleted file mode 100644 index f8a0242cee..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/python-execute-tool-description.txt +++ /dev/null @@ -1 +0,0 @@ -执行Python代码字符串。注意:只有print输出是可见的,函数返回值不会被捕获。使用print语句来查看结果。 diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/python-execute-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/python-execute-tool-parameters.txt deleted file mode 100644 index f2e7d1b1ff..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/python-execute-tool-parameters.txt +++ /dev/null @@ -1,10 +0,0 @@ -{ - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "要执行的Python代码。" - } - }, - "required": ["code"] -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/reduce-operation-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/reduce-operation-tool-description.txt deleted file mode 100644 index 4c10e99877..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/reduce-operation-tool-description.txt +++ /dev/null @@ -1,11 +0,0 @@ -MapReduce工作流文件操作的Reduce操作工具。 -聚合和合并来自多个Map任务的数据,生成最终的合并输出。 - -**重要参数说明:** -- has_value:布尔值,表示是否有有效数据要写入 - - 如果没有找到有效数据,设置为false - - 如果有数据要输出,设置为true -- data:当has_value为true时必须提供数据 - -**重要提示**:工具将在操作完成后自动终止。 -请在单次调用中完成所有内容输出。 diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/reduce-operation-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/reduce-operation-tool-parameters.txt deleted file mode 100644 index 7fbbec1026..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/reduce-operation-tool-parameters.txt +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "object", - "properties": { - "has_value": { - "type": "boolean", - "description": "是否有有效数据要写入。如果没有找到有效数据设置为false,有数据时设置为true" - }, - "data": { - "type": "array", - "items": { - "type": "array", - "items": {"type": "string"} - }, - "description": "数据行列表(仅在has_value为true时需要)" - } - }, - "required": ["has_value"], - "additionalProperties": false -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/terminate-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/terminate-tool-description.txt deleted file mode 100644 index 11e96be17e..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/terminate-tool-description.txt +++ /dev/null @@ -1,2 +0,0 @@ -使用结构化数据终止当前执行步骤。 -以JSON格式提供数据,包含'columns'数组和包含值行的'data'数组。 diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/terminate-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/terminate-tool-parameters.txt deleted file mode 100644 index 5767e9eec4..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/terminate-tool-parameters.txt +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "object", - "properties": { - "columns": { - "type": "array", - "items": { - "type": "string" - }, - "description": "数据结构的列名" - }, - "data": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string" - } - }, - "description": "数据行,每行应匹配列结构" - } - }, - "required": ["columns", "data"], - "additionalProperties": false -} diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/textfileoperator-tool-description.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/textfileoperator-tool-description.txt deleted file mode 100644 index 1e347f6759..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/textfileoperator-tool-description.txt +++ /dev/null @@ -1,18 +0,0 @@ -对文本文件执行各种操作(包括md、html、css、java等)。 - -支持的操作: -- replace:替换文件中的特定文本,需要source_text和target_text参数 -- get_text:从文件的指定行范围获取内容,需要start_line和end_line参数 - 限制:每次调用最多500行,如需更多内容请使用多次调用 -- get_all_text:获取文件的所有内容 - 注意:如果文件内容过长,将自动存储在临时文件中并返回文件路径 -- append:向文件追加内容,需要content参数 -- count_words:统计当前文件的字数 - -支持的文件类型包括: -- 文本文件(.txt) -- Markdown文件(.md、.markdown) -- 网页文件(.html、.css、.scss、.sass、.less) -- 编程文件(.java、.py、.js、.ts、.cpp、.c、.h、.go、.rs、.php、.rb、.swift、.kt、.scala) -- 配置文件(.json、.xml、.yaml、.yml、.toml、.ini、.conf) -- 文档文件(.rst、.adoc) diff --git a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/textfileoperator-tool-parameters.txt b/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/textfileoperator-tool-parameters.txt deleted file mode 100644 index 5cc23cfda7..0000000000 --- a/spring-ai-alibaba-jmanus/src/main/resources/prompts/zh/tool/textfileoperator-tool-parameters.txt +++ /dev/null @@ -1,84 +0,0 @@ -{ - "oneOf": [ - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "replace" - }, - "file_path": { - "type": "string", - "description": "要操作的文件路径" - }, - "source_text": { - "type": "string", - "description": "要被替换的文本" - }, - "target_text": { - "type": "string", - "description": "替换文本" - } - }, - "required": ["action", "file_path", "source_text", "target_text"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "get_text" - }, - "file_path": { - "type": "string", - "description": "要读取的文件路径" - }, - "start_line": { - "type": "integer", - "description": "起始行号(从1开始)" - }, - "end_line": { - "type": "integer", - "description": "结束行号(包含)。注意:每次调用最多500行,如需更多内容请使用多次调用" - } - }, - "required": ["action", "file_path", "start_line", "end_line"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "get_all_text" - }, - "file_path": { - "type": "string", - "description": "要读取全部内容的文件路径。注意:如果文件过长,内容将存储在临时文件中并返回文件路径" - } - }, - "required": ["action", "file_path"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "action": { - "type": "string", - "const": "append" - }, - "file_path": { - "type": "string", - "description": "要操作的文件路径" - }, - "content": { - "type": "string", - "description": "要追加到文件的内容" - } - }, - "required": ["action", "file_path", "content"], - "additionalProperties": false - } - ] -}