Fix usage metrics for the MistralAiChatModelIT tests

This commit is contained in:
Ilayaperumal Gopinathan
2025-01-31 14:40:16 +00:00
parent b902ca2afb
commit a61437df6e

View File

@@ -217,7 +217,7 @@ class MistralAiChatModelIT {
assertThat(response.getResult().getOutput().getText()).containsAnyOf("30.0", "30");
assertThat(response.getMetadata()).isNotNull();
assertThat(response.getMetadata().getUsage()).isNotNull();
assertThat(response.getMetadata().getUsage().getTotalTokens()).isLessThan(1050).isGreaterThan(800);
assertThat(response.getMetadata().getUsage().getTotalTokens()).isLessThan(1050).isGreaterThan(750);
}
@Test
@@ -328,7 +328,7 @@ class MistralAiChatModelIT {
logger.info("Response: " + chatResponse);
assertThat(chatResponse.getMetadata()).isNotNull();
assertThat(chatResponse.getMetadata().getUsage()).isNotNull();
assertThat(chatResponse.getMetadata().getUsage().getTotalTokens()).isLessThan(1050).isGreaterThan(800);
assertThat(chatResponse.getMetadata().getUsage().getTotalTokens()).isLessThan(1050).isGreaterThan(750);
}
record ActorsFilmsRecord(String actor, List<String> movies) {