@@ -1629,14 +1629,9 @@ public void testExecute_rewriteTermQueryWithNewQuerySuccess() throws Exception {
1629
1629
1630
1630
String queryTemplate = "${llm_query}" ;
1631
1631
1632
- String llmQuery = "{\n " +
1633
- " \" query\" : {\n " +
1634
- " \" match_all\" : {}\n " +
1635
- " }\n " +
1636
- "}" ;
1632
+ String llmQuery = "{\n " + " \" query\" : {\n " + " \" match_all\" : {}\n " + " }\n " + "}" ;
1637
1633
Map content = Map .of ("content" , List .of (Map .of ("text" , llmQuery )));
1638
1634
1639
-
1640
1635
List <Map <String , String >> optionalInputMap = new ArrayList <>();
1641
1636
Map <String , String > input = new HashMap <>();
1642
1637
input .put (modelInputField , originalQueryField );
@@ -1648,23 +1643,23 @@ public void testExecute_rewriteTermQueryWithNewQuerySuccess() throws Exception {
1648
1643
optionalOutputMap .add (output );
1649
1644
1650
1645
MLInferenceSearchRequestProcessor requestProcessor = new MLInferenceSearchRequestProcessor (
1651
- "model1" ,
1652
- queryTemplate ,
1653
- null ,
1654
- null ,
1655
- optionalInputMap ,
1656
- optionalOutputMap ,
1657
- null ,
1658
- DEFAULT_MAX_PREDICTION_TASKS ,
1659
- PROCESSOR_TAG ,
1660
- DESCRIPTION ,
1661
- false ,
1662
- "remote" ,
1663
- true ,
1664
- false ,
1665
- "{ \" parameters\" : ${ml_inference.parameters} }" ,
1666
- client ,
1667
- TEST_XCONTENT_REGISTRY_FOR_QUERY
1646
+ "model1" ,
1647
+ queryTemplate ,
1648
+ null ,
1649
+ null ,
1650
+ optionalInputMap ,
1651
+ optionalOutputMap ,
1652
+ null ,
1653
+ DEFAULT_MAX_PREDICTION_TASKS ,
1654
+ PROCESSOR_TAG ,
1655
+ DESCRIPTION ,
1656
+ false ,
1657
+ "remote" ,
1658
+ true ,
1659
+ false ,
1660
+ "{ \" parameters\" : ${ml_inference.parameters} }" ,
1661
+ client ,
1662
+ TEST_XCONTENT_REGISTRY_FOR_QUERY
1668
1663
);
1669
1664
1670
1665
/**
@@ -1680,11 +1675,7 @@ public void testExecute_rewriteTermQueryWithNewQuerySuccess() throws Exception {
1680
1675
* } ]
1681
1676
* }
1682
1677
*/
1683
- ModelTensor modelTensor = ModelTensor
1684
- .builder ()
1685
- .name ("response" )
1686
- .dataAsMap (content )
1687
- .build ();
1678
+ ModelTensor modelTensor = ModelTensor .builder ().name ("response" ).dataAsMap (content ).build ();
1688
1679
ModelTensors modelTensors = ModelTensors .builder ().mlModelTensors (Arrays .asList (modelTensor )).build ();
1689
1680
ModelTensorOutput mlModelTensorOutput = ModelTensorOutput .builder ().mlModelOutputs (Arrays .asList (modelTensors )).build ();
1690
1681
0 commit comments