Skip to content

Commit

Permalink
Adding a missing param in javaDoc
Browse files Browse the repository at this point in the history
Signed-off-by: martinpkr <[email protected]>
  • Loading branch information
martinpkr committed Jun 1, 2024
1 parent 0e43ba7 commit 5f20442
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,11 @@ public static Map<String, String> convertStringToObjectMapToStringToStringMap(Ma
/**
* Checks if the inputs map contains the specified key and parses the associated value to a generic class.
*
* @param <T> the type to which the value should be parsed
* @param inputs the map containing the input data
* @param key the key to check in the map
* @param type the class to parse the value to
* @throws IllegalArgumentException if the type is not supported
* @return the generic type value associated with the key if present, or null if the key is not found
*/
public static <T> T parseIfExists(Map<String, Object> inputs, String key, Class<T> type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public PlainActionFuture<WorkflowData> execute(
String connectorId = (String) inputs.get(CONNECTOR_ID);
Guardrails guardRails = (Guardrails) inputs.get(GUARDRAILS_FIELD);
String modelInterface = (String) inputs.get(INTERFACE_FIELD);
final Boolean deploy = ParseUtils.parseIfExists(inputs, DEPLOY_FIELD,Boolean.class);
final Boolean deploy = ParseUtils.parseIfExists(inputs, DEPLOY_FIELD, Boolean.class);

MLRegisterModelInputBuilder builder = MLRegisterModelInput.builder()
.functionName(FunctionName.REMOTE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.opensearch.ExceptionsHelper;
import org.opensearch.action.support.PlainActionFuture;
import org.opensearch.client.Client;
import org.opensearch.common.Booleans;
import org.opensearch.core.action.ActionListener;
import org.opensearch.core.common.Strings;
import org.opensearch.core.rest.RestStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public PlainActionFuture<WorkflowData> execute(
String type = (String) inputs.get(TYPE);
String name = (String) inputs.get(NAME_FIELD);
String description = (String) inputs.get(DESCRIPTION_FIELD);
Boolean includeOutputInAgentResponse = ParseUtils.parseIfExists(inputs ,INCLUDE_OUTPUT_IN_AGENT_RESPONSE, Boolean.class);
Boolean includeOutputInAgentResponse = ParseUtils.parseIfExists(inputs, INCLUDE_OUTPUT_IN_AGENT_RESPONSE, Boolean.class);
Map<String, String> parameters = getToolsParametersMap(inputs.get(PARAMETERS_FIELD), previousNodeInputs, outputs);

MLToolSpec.MLToolSpecBuilder builder = MLToolSpec.builder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*/
package org.opensearch.flowframework.util;

import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.opensearch.common.xcontent.XContentFactory;
import org.opensearch.core.rest.RestStatus;
import org.opensearch.core.xcontent.XContentBuilder;
Expand Down

0 comments on commit 5f20442

Please sign in to comment.