Skip to content

Commit 8909028

Browse files
committed
Remove ambiguous test from ChatClientToolsWithGenericArgumentTypesIT
Signed-off-by: Ilayaperumal Gopinathan <[email protected]>
1 parent 1ee28c6 commit 8909028

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

models/spring-ai-openai/src/test/java/org/springframework/ai/openai/chat/client/ChatClientToolsWithGenericArgumentTypesIT.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -58,31 +58,6 @@ void beforeEach() {
5858
@Autowired
5959
ChatModel chatModel;
6060

61-
@Test
62-
void toolWithGenericArgumentTypes2() {
63-
// @formatter:off
64-
// This test verifies that when an invalid enum value (YELLOW) is requested,
65-
// the model gracefully handles it by choosing a valid color from the enum.
66-
String response = ChatClient.create(this.chatModel).prompt()
67-
.user("Turn light YELLOW in the living room and the kitchen. You can violate the color enum for this request.")
68-
.tools(new TestToolProvider())
69-
.call()
70-
.content();
71-
// @formatter:on
72-
73-
logger.info("Response: {}", response);
74-
75-
// Verify the call completed successfully and both rooms were set
76-
assertThat(arguments).containsKeys("living room", "kitchen");
77-
78-
// Verify a valid color was chosen (not YELLOW, which doesn't exist in the enum)
79-
assertThat(arguments.get("living room")).isIn(LightColor.RED, LightColor.GREEN, LightColor.BLUE);
80-
assertThat(arguments.get("kitchen")).isIn(LightColor.RED, LightColor.GREEN, LightColor.BLUE);
81-
82-
// Verify the model grouped both rooms in a single call
83-
assertThat(callCounter.get()).isLessThanOrEqualTo(2);
84-
}
85-
8661
@Test
8762
void toolWithGenericArgumentTypes() {
8863
// @formatter:off

0 commit comments

Comments
 (0)