Skip to content

Commit b774a95

Browse files
committed
Remove assertion that depends on unreliable response from AI Model
1 parent ad52730 commit b774a95

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-ai-test/src/main/java/org/springframework/ai/evaluation/BaseMemoryTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ void memoryChatBot() {
5959
var chatBotResponse1 = this.chatBot.call(promptContext);
6060

6161
logger.info("Response1: " + chatBotResponse1.getChatResponse().getResult().getOutput().getContent());
62-
assertThat(chatBotResponse1.getChatResponse().getResult().getOutput().getContent()).contains("John");
62+
// response varies too much.
63+
// assertThat(chatBotResponse1.getChatResponse().getResult().getOutput().getContent()).contains("John");
6364

6465
var chatBotResponse2 = this.chatBot.call(new PromptContext(new Prompt(new String("What is my name?"))));
6566
logger.info("Response2: " + chatBotResponse2.getChatResponse().getResult().getOutput().getContent());
@@ -88,7 +89,7 @@ void memoryStreamingChatBot() {
8889
.collect(Collectors.joining());
8990

9091
logger.info("Response1: " + chatBotResponse1);
91-
assertThat(chatBotResponse1).contains("John");
92+
// response varies too much assertThat(chatBotResponse1).contains("John");
9293

9394
var fluxChatBotResponse2 = this.streamingChatBot
9495
.stream(new PromptContext(new Prompt(new String("What is my name?"))));

0 commit comments

Comments
 (0)