Skip to content

Commit 16c531c

Browse files
committed
Azure ITs adjustment: prove streaming does chunks the response content
1 parent c81262d commit 16c531c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

models/spring-ai-azure-openai/src/test/java/org/springframework/ai/azure/openai/function/AzureOpenAiChatModelFunctionCallIT.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ void streamFunctionCallTest() {
113113
.map(AssistantMessage::getContent)
114114
.collect(Collectors.joining());
115115
logger.info("Response: {}", content);
116-
assertThat(counter.get()).isGreaterThan(2);
116+
117+
assertThat(counter.get()).isGreaterThan(30).as("The response should be chunked in more than 30 messages");
118+
117119
assertThat(content).containsAnyOf("30.0", "30");
118120
assertThat(content).containsAnyOf("10.0", "10");
119121
assertThat(content).containsAnyOf("15.0", "15");

spring-ai-spring-boot-autoconfigure/src/test/java/org/springframework/ai/autoconfigure/azure/AzureOpenAiAutoConfigurationIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public void chatCompletionStreaming() {
9292
Flux<ChatResponse> response = chatModel.stream(new Prompt(List.of(userMessage, systemMessage)));
9393

9494
List<ChatResponse> responses = response.collectList().block();
95-
assertThat(responses.size()).isGreaterThan(1);
95+
assertThat(responses.size()).isGreaterThan(10);
9696

9797
String stitchedResponseContent = responses.stream()
9898
.map(ChatResponse::getResults)

0 commit comments

Comments
 (0)