Skip to content

Commit

Permalink
fix streaming unknown enum test
Browse files Browse the repository at this point in the history
  • Loading branch information
tanzimfh committed Jul 15, 2024
1 parent 5c488b1 commit c1fbf0b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,13 @@ internal class StreamingSnapshotTests {
val responses = apiController.generateContentStream(textGenerateContentRequest("prompt"))

withTimeout(testTimeout) {
responses.first {
val responseList = responses.toList()
responseList.isEmpty() shouldBe false
responseList.any {
it.candidates?.any {
it.safetyRatings?.any { it.category == HarmCategory.UNKNOWN } ?: false
} ?: false
}
} shouldBe true
}
}

Expand Down

0 comments on commit c1fbf0b

Please sign in to comment.