Skip to content

Commit e79db71

Browse files
author
David Motsonashvili
committed
formatting and changelog
1 parent d23a093 commit e79db71

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

firebase-ai/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Unreleased
2+
- [feature] Added support for `ImagenGenerationResponse.safetyAttributes` (#7322)
23

34
# 17.2.0
45

firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ImagenGenerationResponse.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ internal constructor(public val images: List<T>, public val filteredReason: Stri
4242
internal fun toPublicInline() =
4343
ImagenGenerationResponse(
4444
images = predictions.filter { it.mimeType != null }.map { it.toPublicInline() },
45-
predictions.firstNotNullOfOrNull { it.raiFilteredReason },
45+
predictions.firstNotNullOfOrNull { it.raiFilteredReason },
4646
)
4747
}
4848

@@ -68,7 +68,7 @@ internal constructor(public val images: List<T>, public val filteredReason: Stri
6868
internal data class ImagenSafetyAttributes(
6969
val categories: List<String>? = null,
7070
val scores: List<Double>? = null
71-
){
71+
) {
7272
internal fun toPublic(): Map<String, Double> {
7373
return categories?.zip(scores!!)?.toMap() ?: emptyMap()
7474
}

firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ImagenInlineImage.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ public class ImagenInlineImage
3535
internal constructor(
3636
public val data: ByteArray,
3737
public val mimeType: String,
38-
public val safetyAttributes: Map<String, Double>) {
38+
public val safetyAttributes: Map<String, Double>
39+
) {
3940

4041
/**
4142
* Returns the image as an Android OS native [Bitmap] so that it can be saved or sent to the UI.

0 commit comments

Comments
 (0)