|
8 | 8 | import static org.opensearch.ml.common.utils.StringUtils.gson;
|
9 | 9 |
|
10 | 10 | import java.util.HashMap;
|
11 |
| -import java.util.List; |
12 | 11 | import java.util.Map;
|
13 | 12 |
|
14 | 13 | import org.opensearch.action.ActionRequest;
|
|
18 | 17 | import org.opensearch.ml.common.dataset.remote.RemoteInferenceInputDataSet;
|
19 | 18 | import org.opensearch.ml.common.input.execute.agent.AgentMLInput;
|
20 | 19 | import org.opensearch.ml.common.output.model.ModelTensorOutput;
|
21 |
| -import org.opensearch.ml.common.spi.tools.Tool; |
22 | 20 | import org.opensearch.ml.common.spi.tools.ToolAnnotation;
|
| 21 | +import org.opensearch.ml.common.spi.tools.WithoutModelTool; |
23 | 22 | import org.opensearch.ml.common.transport.execute.MLExecuteTaskAction;
|
24 | 23 | import org.opensearch.ml.common.transport.execute.MLExecuteTaskRequest;
|
25 | 24 | import org.opensearch.ml.repackage.com.google.common.annotations.VisibleForTesting;
|
|
33 | 32 | */
|
34 | 33 | @Log4j2
|
35 | 34 | @ToolAnnotation(AgentTool.TYPE)
|
36 |
| -public class AgentTool implements Tool { |
| 35 | +public class AgentTool implements WithoutModelTool { |
37 | 36 | public static final String TYPE = "AgentTool";
|
38 | 37 | private final Client client;
|
39 | 38 |
|
@@ -98,7 +97,7 @@ public boolean validate(Map<String, String> parameters) {
|
98 | 97 | return true;
|
99 | 98 | }
|
100 | 99 |
|
101 |
| - public static class Factory implements Tool.Factory<AgentTool> { |
| 100 | + public static class Factory implements WithoutModelTool.Factory<AgentTool> { |
102 | 101 | private Client client;
|
103 | 102 |
|
104 | 103 | private static Factory INSTANCE;
|
@@ -139,11 +138,6 @@ public String getDefaultType() {
|
139 | 138 | public String getDefaultVersion() {
|
140 | 139 | return null;
|
141 | 140 | }
|
142 |
| - |
143 |
| - @Override |
144 |
| - public List<String> getAllModelKeys() { |
145 |
| - return List.of(); |
146 |
| - } |
147 | 141 | }
|
148 | 142 |
|
149 | 143 | private Map<String, String> extractInputParameters(Map<String, String> parameters) {
|
|
0 commit comments