Azure ITs adjustment: prove streaming does chunks the response content

This commit is contained in:
Christian Tzolov
2024-06-18 18:39:57 +02:00
parent c81262d903
commit 16c531c36c
2 changed files with 4 additions and 2 deletions

View File

@@ -113,7 +113,9 @@ class AzureOpenAiChatModelFunctionCallIT {
.map(AssistantMessage::getContent)
.collect(Collectors.joining());
logger.info("Response: {}", content);
assertThat(counter.get()).isGreaterThan(2);
assertThat(counter.get()).isGreaterThan(30).as("The response should be chunked in more than 30 messages");
assertThat(content).containsAnyOf("30.0", "30");
assertThat(content).containsAnyOf("10.0", "10");
assertThat(content).containsAnyOf("15.0", "15");

View File

@@ -92,7 +92,7 @@ public class AzureOpenAiAutoConfigurationIT {
Flux<ChatResponse> response = chatModel.stream(new Prompt(List.of(userMessage, systemMessage)));
List<ChatResponse> responses = response.collectList().block();
assertThat(responses.size()).isGreaterThan(1);
assertThat(responses.size()).isGreaterThan(10);
String stitchedResponseContent = responses.stream()
.map(ChatResponse::getResults)