Skip to content

Commit 9b9f71d

Browse files
authored
pass tenant id to tools (#4460)
Signed-off-by: Hailong Cui <[email protected]>
1 parent 3174988 commit 9b9f71d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLChatAgentRunner.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
package org.opensearch.ml.engine.algorithms.agent;
77

8+
import static org.opensearch.ml.common.CommonValue.TENANT_ID_FIELD;
89
import static org.opensearch.ml.common.agui.AGUIConstants.AGUI_PARAM_ASSISTANT_TOOL_CALL_MESSAGES;
910
import static org.opensearch.ml.common.agui.AGUIConstants.AGUI_PARAM_BACKEND_TOOL_NAMES;
1011
import static org.opensearch.ml.common.agui.AGUIConstants.AGUI_PARAM_TOOLS;
@@ -499,6 +500,7 @@ private void runReAct(
499500
action,
500501
actionInput
501502
);
503+
toolParams.put(TENANT_ID_FIELD, tenantId);
502504
lastToolParams.clear();
503505
lastToolParams.putAll(toolParams);
504506
runTool(

0 commit comments

Comments
 (0)