From 79ecb6f73fccb43cd8d57d10343860df70fb1103 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 19 Mar 2024 17:41:06 -0700 Subject: [PATCH] [Backport 2.13] Fixing register agent tests (#597) Fixing register agent tests (#595) * Fixing register agent tests * fixing register agent IT * Fixing agent type --------- (cherry picked from commit ebcc8f7c7d98378e054644cc44b2a59201170813) Signed-off-by: Joshua Palis Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .../opensearch/flowframework/workflow/RegisterAgentTests.java | 3 ++- src/test/resources/template/agent-framework.json | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/opensearch/flowframework/workflow/RegisterAgentTests.java b/src/test/java/org/opensearch/flowframework/workflow/RegisterAgentTests.java index a2e0807b3..9005052ae 100644 --- a/src/test/java/org/opensearch/flowframework/workflow/RegisterAgentTests.java +++ b/src/test/java/org/opensearch/flowframework/workflow/RegisterAgentTests.java @@ -16,6 +16,7 @@ import org.opensearch.flowframework.exception.FlowFrameworkException; import org.opensearch.flowframework.indices.FlowFrameworkIndicesHandler; import org.opensearch.ml.client.MachineLearningNodeClient; +import org.opensearch.ml.common.MLAgentType; import org.opensearch.ml.common.agent.LLMSpec; import org.opensearch.ml.common.agent.MLAgent; import org.opensearch.ml.common.agent.MLMemorySpec; @@ -69,7 +70,7 @@ public void setUp() throws Exception { Map.ofEntries( Map.entry("name", "test"), Map.entry("description", "description"), - Map.entry("type", "type"), + Map.entry("type", MLAgentType.FLOW.name()), Map.entry("llm.model_id", "xyz"), Map.entry("llm.parameters", Collections.emptyMap()), Map.entry("tools", tools), diff --git a/src/test/resources/template/agent-framework.json b/src/test/resources/template/agent-framework.json index 2a12938a4..5c4ce6ef0 100644 --- a/src/test/resources/template/agent-framework.json +++ b/src/test/resources/template/agent-framework.json @@ -96,7 +96,7 @@ }, "user_inputs": { "name": "Sub Agent", - "type": "cot", + "type": "CONVERSATIONAL", "description": "this is a test agent", "parameters": { "hello": "world" @@ -139,7 +139,7 @@ }, "user_inputs": { "name": "DEMO-Test_Agent_For_CoT", - "type": "cot", + "type": "CONVERSATIONAL", "description": "this is a test agent", "parameters": { "hello": "world"