File tree Expand file tree Collapse file tree 3 files changed +1
-16
lines changed
main/kotlin/com/google/firebase/ai/type
test/java/com/google/firebase/ai Expand file tree Collapse file tree 3 files changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -713,10 +713,8 @@ package com.google.firebase.ai.type {
713713 method public android.graphics.Bitmap asBitmap();
714714 method public byte[] getData();
715715 method public String getMimeType();
716- method public java.util.Map<java.lang.String,java.lang.Double> getSafetyAttributes();
717716 property public final byte[] data;
718717 property public final String mimeType;
719- property public final java.util.Map<java.lang.String,java.lang.Double> safetyAttributes;
720718 }
721719
722720 public final class ImagenInlineImageKt {
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ public class ImagenInlineImage
3535internal constructor (
3636 public val data: ByteArray ,
3737 public val mimeType: String ,
38- public val safetyAttributes: Map <String , Double >
3938) {
4039
4140 /* *
@@ -58,5 +57,5 @@ public fun Bitmap.toImagenInlineImage(): ImagenInlineImage {
5857 val byteArrayOutputStream = ByteArrayOutputStream ()
5958 this .compress(Bitmap .CompressFormat .JPEG , 80 , byteArrayOutputStream)
6059 val byteArray = byteArrayOutputStream.toByteArray()
61- return ImagenInlineImage (data = byteArray, mimeType = " image/jpeg" , safetyAttributes = emptyMap() )
60+ return ImagenInlineImage (data = byteArray, mimeType = " image/jpeg" )
6261}
Original file line number Diff line number Diff line change @@ -591,18 +591,6 @@ 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-
606594 @Test
607595 fun `google search grounding metadata is parsed correctly` () =
608596 goldenVertexUnaryFile(" unary-success-google-search-grounding.json" ) {
You can’t perform that action at this time.
0 commit comments