File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
common/src/main/java/org/opensearch/ml/common/indexInsight Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1515
1616import java .nio .charset .StandardCharsets ;
1717import java .time .Instant ;
18- import java .util .Collections ;
1918import java .util .HashMap ;
2019import java .util .List ;
2120import java .util .Map ;
@@ -471,11 +470,14 @@ protected static void callLLMWithAgent(
471470 String sourceIndex ,
472471 ActionListener <String > listener
473472 ) {
473+ Map <String , String > params = new HashMap <>();
474+ params .put ("prompt" , prompt );
475+
474476 AgentMLInput agentInput = AgentMLInput
475477 .AgentMLInputBuilder ()
476478 .agentId (agentId )
477479 .functionName (FunctionName .AGENT )
478- .inputDataset (RemoteInferenceInputDataSet .builder ().parameters (Collections . singletonMap ( "prompt" , prompt ) ).build ())
480+ .inputDataset (RemoteInferenceInputDataSet .builder ().parameters (params ).build ())
479481 .build ();
480482
481483 MLExecuteTaskRequest executeRequest = new MLExecuteTaskRequest (FunctionName .AGENT , agentInput );
You can’t perform that action at this time.
0 commit comments