@@ -393,11 +393,9 @@ public static void deleteInferenceEndpoints(RestClient client) throws IOExceptio
393393 deleteCompletionInferenceEndpoint (client );
394394 }
395395
396-
397396 /** The semantic_text mapping type require an inference endpoint that needs to be setup before creating the index. */
398397 public static void createSparseEmbeddingInferenceEndpoint (RestClient client ) throws IOException {
399- createInferenceEndpoint (client , TaskType .SPARSE_EMBEDDING , "test_sparse_inference" ,
400- """
398+ createInferenceEndpoint (client , TaskType .SPARSE_EMBEDDING , "test_sparse_inference" , """
401399 {
402400 "service": "test_service",
403401 "service_settings": { "model": "my_model", "api_key": "abc64" },
@@ -450,14 +448,13 @@ public static boolean clusterHasCompletionInferenceEndpoint(RestClient client) t
450448 return clusterHasInferenceEndpoint (client , TaskType .COMPLETION , "test_completion" );
451449 }
452450
453-
454- private static void createInferenceEndpoint ( RestClient client , TaskType taskType , String inferenceId , String modelSettings ) throws IOException {
451+ private static void createInferenceEndpoint ( RestClient client , TaskType taskType , String inferenceId , String modelSettings )
452+ throws IOException {
455453 Request request = new Request ("PUT" , "_inference/" + taskType .name () + "/" + inferenceId );
456454 request .setJsonEntity (modelSettings );
457455 client .performRequest (request );
458456 }
459457
460-
461458 private static boolean clusterHasInferenceEndpoint (RestClient client , TaskType taskType , String inferenceId ) throws IOException {
462459 Request request = new Request ("GET" , "_inference/" + taskType .name () + "/" + inferenceId );
463460 try {
0 commit comments