From 502aec87a3c53f8fa0df6743eeae47f1fb6c54fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ros=C3=A1rio=20P=2E=20Fernandes?= Date: Tue, 27 May 2025 16:55:42 +0100 Subject: [PATCH 1/2] Update ImagenPersonFilterLevel refdocs to match the iOS SDK --- .../ai/type/ImagenPersonFilterLevel.kt | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.kt b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.kt index 1d9ce63c244..c606eed358f 100644 --- a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.kt +++ b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.kt @@ -20,12 +20,24 @@ package com.google.firebase.ai.type @PublicPreviewAPI public class ImagenPersonFilterLevel private constructor(internal val internalVal: String) { public companion object { - /** No filters applied. */ + /** Allow generation of images containing people of all ages. + * + * > Important: Generation of images containing people or faces may require your use case to be + * reviewed and approved by Cloud support; see the [Responsible AI and usage + * guidelines](https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen#person-face-gen) + * for more details. + */ @JvmField public val ALLOW_ALL: ImagenPersonFilterLevel = ImagenPersonFilterLevel("allow_all") - /** Filters out any images containing depictions of children. */ + /** Allow generation of images containing adults only; images of children are filtered out. + * + * > Important: Generation of images containing people or faces may require your use case to be + * reviewed and approved by Cloud support; see the [Responsible AI and usage + * guidelines](https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen#person-face-gen) + * for more details. + */ @JvmField public val ALLOW_ADULT: ImagenPersonFilterLevel = ImagenPersonFilterLevel("allow_adult") - /** Filters out any images containing depictions of people. */ + /** Disallow generation of images containing people or faces; images of people are filtered out. */ @JvmField public val BLOCK_ALL: ImagenPersonFilterLevel = ImagenPersonFilterLevel("dont_allow") } } From 8ea5863393630f93aa80636e293d47259e297564 Mon Sep 17 00:00:00 2001 From: rosariopf Date: Tue, 27 May 2025 17:14:21 +0100 Subject: [PATCH 2/2] style fixes --- .../ai/type/ImagenPersonFilterLevel.kt | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.kt b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.kt index c606eed358f..5daa354bbbd 100644 --- a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.kt +++ b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.kt @@ -20,24 +20,30 @@ package com.google.firebase.ai.type @PublicPreviewAPI public class ImagenPersonFilterLevel private constructor(internal val internalVal: String) { public companion object { - /** Allow generation of images containing people of all ages. - * - * > Important: Generation of images containing people or faces may require your use case to be - * reviewed and approved by Cloud support; see the [Responsible AI and usage - * guidelines](https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen#person-face-gen) - * for more details. - */ + /** + * Allow generation of images containing people of all ages. + * + * > Important: Generation of images containing people or faces may require your use case to be + * reviewed and approved by Cloud support; see the + * [Responsible AI and usage + * guidelines](https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen#person-face-gen) + * for more details. + */ @JvmField public val ALLOW_ALL: ImagenPersonFilterLevel = ImagenPersonFilterLevel("allow_all") - /** Allow generation of images containing adults only; images of children are filtered out. - * - * > Important: Generation of images containing people or faces may require your use case to be - * reviewed and approved by Cloud support; see the [Responsible AI and usage - * guidelines](https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen#person-face-gen) - * for more details. - */ + /** + * Allow generation of images containing adults only; images of children are filtered out. + * + * > Important: Generation of images containing people or faces may require your use case to be + * reviewed and approved by Cloud support; see the + * [Responsible AI and usage + * guidelines](https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen#person-face-gen) + * for more details. + */ @JvmField public val ALLOW_ADULT: ImagenPersonFilterLevel = ImagenPersonFilterLevel("allow_adult") - /** Disallow generation of images containing people or faces; images of people are filtered out. */ + /** + * Disallow generation of images containing people or faces; images of people are filtered out. + */ @JvmField public val BLOCK_ALL: ImagenPersonFilterLevel = ImagenPersonFilterLevel("dont_allow") } }