Skip to content

Commit 7e08f9e

Browse files
committed
[Enhancement] Enhance validation for create connector API
This change will address the second part of validation "pre and post processing function validation". Partially resolves opensearch-project#2993 Signed-off-by: Abdul Muneer Kolarkunnu <muneer.kolarkunnu@netapp.com>
1 parent 222ea7b commit 7e08f9e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

common/src/main/java/org/opensearch/ml/common/connector/ConnectorAction.java

+1-6
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,7 @@ public void validatePrePostProcessFunctions(Map<String, String> parameters) {
282282
case COHERE:
283283
if (!(COHERE_EMBEDDING.equals(postProcessFunction) || COHERE_RERANK.equals(postProcessFunction))) {
284284
throw new IllegalArgumentException(
285-
"LLM service is "
286-
+ COHERE
287-
+ ", so PostProcessFunction should be "
288-
+ COHERE_EMBEDDING
289-
+ " or "
290-
+ COHERE_RERANK
285+
"LLM service is " + COHERE + ", so PostProcessFunction should be " + COHERE_EMBEDDING + " or " + COHERE_RERANK
291286
);
292287
}
293288
break;

0 commit comments

Comments
 (0)