File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
firebase-ai/src/test/java/com/google/firebase/ai Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -591,6 +591,18 @@ internal class VertexAIUnarySnapshotTests {
591591 }
592592 }
593593
594+ @Test
595+ fun `generateImages should contain safety data` () =
596+ goldenVertexUnaryFile(" unary-success-generate-images-safety_info.json" ) {
597+ withTimeout(testTimeout) {
598+ val response = imagenModel.generateImages(" prompt" )
599+ response.images[0 ].safetyAttributes shouldNotBe emptyMap<String , Double >()
600+ response.images[1 ].safetyAttributes shouldNotBe emptyMap<String , Double >()
601+ response.images[2 ].safetyAttributes shouldNotBe emptyMap<String , Double >()
602+ response.images[3 ].safetyAttributes shouldBe emptyMap<String , Double >()
603+ }
604+ }
605+
594606 @Test
595607 fun `google search grounding metadata is parsed correctly` () =
596608 goldenVertexUnaryFile(" unary-success-google-search-grounding.json" ) {
You can’t perform that action at this time.
0 commit comments