Skip to content

Commit

Permalink
add UT for null action input
Browse files Browse the repository at this point in the history
Signed-off-by: Jing Zhang <[email protected]>
  • Loading branch information
jngz-es committed Dec 2, 2024
1 parent b1c518a commit c493fee
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,18 @@ public void testConstructToolParams() {
});
}

@Test
public void testConstructToolParamsNullActionInput() {
String question = "dummy question";
String actionInput = null;
verifyConstructToolParams(question, actionInput, (toolParams) -> {
Assert.assertEquals(3, toolParams.size());
Assert.assertEquals("value1", toolParams.get("key1"));
Assert.assertNull(toolParams.get("llm_generated_action_input"));
Assert.assertNull(toolParams.get("input"));
});
}

@Test
public void testConstructToolParams_UseOriginalInput() {
String question = "dummy question";
Expand Down

0 comments on commit c493fee

Please sign in to comment.