Skip to content

Commit

Permalink
Merge branch 'main' into daymon-update-sample-app
Browse files Browse the repository at this point in the history
  • Loading branch information
daymxn authored Jul 3, 2024
2 parents 274513b + 13b4d44 commit a7fbf59
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ internal class UnarySnapshotTests {
withTimeout(testTimeout) {
val response = apiController.generateContent(textGenerateContentRequest("prompt"))

response.candidates?.first {
it.safetyRatings?.any { it.category == HarmCategory.UNKNOWN } ?: false
}
response.candidates?.isNullOrEmpty() shouldBe false
val candidate = response.candidates?.first()
candidate?.safetyRatings?.any { it.category == HarmCategory.UNKNOWN } shouldBe true
}
}

Expand Down

0 comments on commit a7fbf59

Please sign in to comment.