Skip to content

Conversation

@thatfiredev
Copy link
Member

This PR updates the ImagenPersonFilter refdocs to match the iOS SDK, including the information about the Person and face generation allowlist.

@thatfiredev thatfiredev requested review from davidmotson and rlazo May 27, 2025 15:58
@github-actions
Copy link
Contributor

github-actions bot commented May 27, 2025

Javadoc Changes:
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/ai/type/ImagenPersonFilterLevel.html	2025-05-27 16:20:15.066206449 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/ai/type/ImagenPersonFilterLevel.html	2025-05-27 16:16:54.032005554 +0000
@@ -49,21 +49,21 @@
             <td><code>static&nbsp;final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/ImagenPersonFilterLevel.html">ImagenPersonFilterLevel</a></code></td>
             <td>
               <div><code><a href="/docs/reference/android/com/google/firebase/ai/type/ImagenPersonFilterLevel.Companion.html#ALLOW_ADULT()">ALLOW_ADULT</a></code></div>
-              <p>Filters out any images containing depictions of children.</p>
+              <p>Allow generation of images containing adults only; images of children are filtered out.</p>
             </td>
           </tr>
           <tr>
             <td><code>static&nbsp;final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/ImagenPersonFilterLevel.html">ImagenPersonFilterLevel</a></code></td>
             <td>
               <div><code><a href="/docs/reference/android/com/google/firebase/ai/type/ImagenPersonFilterLevel.Companion.html#ALLOW_ALL()">ALLOW_ALL</a></code></div>
-              <p>No filters applied.</p>
+              <p>Allow generation of images containing people of all ages.</p>
             </td>
           </tr>
           <tr>
             <td><code>static&nbsp;final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/ImagenPersonFilterLevel.html">ImagenPersonFilterLevel</a></code></td>
             <td>
               <div><code><a href="/docs/reference/android/com/google/firebase/ai/type/ImagenPersonFilterLevel.Companion.html#BLOCK_ALL()">BLOCK_ALL</a></code></div>
-              <p>Filters out any images containing depictions of people.</p>
+              <p>Disallow generation of images containing people or faces; images of people are filtered out.</p>
             </td>
           </tr>
         </tbody>
@@ -74,17 +74,23 @@
       <div class="api-item"><a name="getALLOW_ADULT()"></a><a name="setALLOW_ADULT()"></a><a name="getALLOW_ADULT--"></a><a name="setALLOW_ADULT--"></a>
         <h3 class="api-name" id="ALLOW_ADULT()">ALLOW_ADULT</h3>
         <pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/ImagenPersonFilterLevel.html">ImagenPersonFilterLevel</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/ai/type/ImagenPersonFilterLevel.Companion.html#ALLOW_ADULT()">ALLOW_ADULT</a></pre>
-        <p>Filters out any images containing depictions of children.</p>
+        <p>Allow generation of images containing adults only; images of children are filtered out.</p>
+        <blockquote>
+          <p>Important: Generation of images containing people or faces may require your use case to be reviewed and approved by Cloud support; see the <a href="https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen#person-face-gen">Responsible AI and usage      * guidelines</a> for more details.</p>
+        </blockquote>
       </div>
       <div class="api-item"><a name="getALLOW_ALL()"></a><a name="setALLOW_ALL()"></a><a name="getALLOW_ALL--"></a><a name="setALLOW_ALL--"></a>
         <h3 class="api-name" id="ALLOW_ALL()">ALLOW_ALL</h3>
         <pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/ImagenPersonFilterLevel.html">ImagenPersonFilterLevel</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/ai/type/ImagenPersonFilterLevel.Companion.html#ALLOW_ALL()">ALLOW_ALL</a></pre>
-        <p>No filters applied.</p>
+        <p>Allow generation of images containing people of all ages.</p>
+        <blockquote>
+          <p>Important: Generation of images containing people or faces may require your use case to be reviewed and approved by Cloud support; see the <a href="https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen#person-face-gen">Responsible AI and usage      * guidelines</a> for more details.</p>
+        </blockquote>
       </div>
       <div class="api-item"><a name="getBLOCK_ALL()"></a><a name="setBLOCK_ALL()"></a><a name="getBLOCK_ALL--"></a><a name="setBLOCK_ALL--"></a>
         <h3 class="api-name" id="BLOCK_ALL()">BLOCK_ALL</h3>
         <pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/ImagenPersonFilterLevel.html">ImagenPersonFilterLevel</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/ai/type/ImagenPersonFilterLevel.Companion.html#BLOCK_ALL()">BLOCK_ALL</a></pre>
-        <p>Filters out any images containing depictions of people.</p>
+        <p>Disallow generation of images containing people or faces; images of people are filtered out.</p>
       </div>
     </div>
   </body>
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.html	2025-05-27 16:20:15.120206503 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.html	2025-05-27 16:16:54.100005638 +0000
@@ -29,21 +29,21 @@
             <td><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.html">ImagenPersonFilterLevel</a></code></td>
             <td>
               <div><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.Companion.html#ALLOW_ADULT()">ALLOW_ADULT</a></code></div>
-              <p>Filters out any images containing depictions of children.</p>
+              <p>Allow generation of images containing adults only; images of children are filtered out.</p>
             </td>
           </tr>
           <tr>
             <td><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.html">ImagenPersonFilterLevel</a></code></td>
             <td>
               <div><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.Companion.html#ALLOW_ALL()">ALLOW_ALL</a></code></div>
-              <p>No filters applied.</p>
+              <p>Allow generation of images containing people of all ages.</p>
             </td>
           </tr>
           <tr>
             <td><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.html">ImagenPersonFilterLevel</a></code></td>
             <td>
               <div><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.Companion.html#BLOCK_ALL()">BLOCK_ALL</a></code></div>
-              <p>Filters out any images containing depictions of people.</p>
+              <p>Disallow generation of images containing people or faces; images of people are filtered out.</p>
             </td>
           </tr>
         </tbody>
@@ -54,17 +54,23 @@
       <div class="api-item"><a name="getALLOW_ADULT()"></a><a name="setALLOW_ADULT()"></a><a name="getALLOW_ADULT--"></a><a name="setALLOW_ADULT--"></a>
         <h3 class="api-name" id="ALLOW_ADULT()">ALLOW_ADULT</h3>
         <pre class="api-signature no-pretty-print">val&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.Companion.html#ALLOW_ADULT()">ALLOW_ADULT</a>:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.html">ImagenPersonFilterLevel</a></pre>
-        <p>Filters out any images containing depictions of children.</p>
+        <p>Allow generation of images containing adults only; images of children are filtered out.</p>
+        <blockquote>
+          <p>Important: Generation of images containing people or faces may require your use case to be reviewed and approved by Cloud support; see the <a href="https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen#person-face-gen">Responsible AI and usage      * guidelines</a> for more details.</p>
+        </blockquote>
       </div>
       <div class="api-item"><a name="getALLOW_ALL()"></a><a name="setALLOW_ALL()"></a><a name="getALLOW_ALL--"></a><a name="setALLOW_ALL--"></a>
         <h3 class="api-name" id="ALLOW_ALL()">ALLOW_ALL</h3>
         <pre class="api-signature no-pretty-print">val&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.Companion.html#ALLOW_ALL()">ALLOW_ALL</a>:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.html">ImagenPersonFilterLevel</a></pre>
-        <p>No filters applied.</p>
+        <p>Allow generation of images containing people of all ages.</p>
+        <blockquote>
+          <p>Important: Generation of images containing people or faces may require your use case to be reviewed and approved by Cloud support; see the <a href="https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen#person-face-gen">Responsible AI and usage      * guidelines</a> for more details.</p>
+        </blockquote>
       </div>
       <div class="api-item"><a name="getBLOCK_ALL()"></a><a name="setBLOCK_ALL()"></a><a name="getBLOCK_ALL--"></a><a name="setBLOCK_ALL--"></a>
         <h3 class="api-name" id="BLOCK_ALL()">BLOCK_ALL</h3>
         <pre class="api-signature no-pretty-print">val&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.Companion.html#BLOCK_ALL()">BLOCK_ALL</a>:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/ImagenPersonFilterLevel.html">ImagenPersonFilterLevel</a></pre>
-        <p>Filters out any images containing depictions of people.</p>
+        <p>Disallow generation of images containing people or faces; images of people are filtered out.</p>
       </div>
     </div>
   </body>

@google-oss-bot
Copy link
Contributor

1 Warning
⚠️ Did you forget to add a changelog entry? (Add the 'no-changelog' label to the PR to silence this warning.)

Generated by 🚫 Danger

@github-actions
Copy link
Contributor

github-actions bot commented May 27, 2025

Test Results

 24 files   -  40   24 suites   - 40   34s ⏱️ - 1m 47s
102 tests  - 217  102 ✅  - 216  0 💤  - 1  0 ❌ ±0 
204 runs   - 438  204 ✅  - 436  0 💤  - 2  0 ❌ ±0 

Results for commit 8ea5863. ± Comparison against base commit ec4b353.

This pull request removes 319 and adds 102 tests. Note that renamed tests count towards both.
com.google.firebase.inappmessaging.FirebaseInAppMessagingTest ‑ addClickListener_forwardsEventListenerRequestsToDeveloperListenerManager
com.google.firebase.inappmessaging.FirebaseInAppMessagingTest ‑ addDismissListener_forwardsEventListenerRequestsToDeveloperListenerManager
com.google.firebase.inappmessaging.FirebaseInAppMessagingTest ‑ addDisplayErrorListener_forwardsEventListenerRequestsToDeveloperListenerManager
com.google.firebase.inappmessaging.FirebaseInAppMessagingTest ‑ addImpressionListener_forwardsEventListenerRequestsToDeveloperListenerManager
com.google.firebase.inappmessaging.FirebaseInAppMessagingTest ‑ addRemoveAllListeners_WorksAsExpected
com.google.firebase.inappmessaging.FirebaseInAppMessagingTest ‑ addRemoveListeners_WorksAsExpected
com.google.firebase.inappmessaging.FirebaseInAppMessagingTest ‑ automaticDataCollectionDisabling_clearsInDataCollectionHelper
com.google.firebase.inappmessaging.FirebaseInAppMessagingTest ‑ automaticDataCollectionDisabling_disablesInDataCollectionHelper
com.google.firebase.inappmessaging.FirebaseInAppMessagingTest ‑ automaticDataCollectionEnabling_enablesInDataCollectionHelper
com.google.firebase.inappmessaging.FirebaseInAppMessagingTest ‑ clearDisplayListener_removesListener
…
com.google.firebase.ai.DevAPIStreamingSnapshotTests ‑ citation parsed correctly
com.google.firebase.ai.DevAPIStreamingSnapshotTests ‑ image rejected
com.google.firebase.ai.DevAPIStreamingSnapshotTests ‑ long reply
com.google.firebase.ai.DevAPIStreamingSnapshotTests ‑ prompt blocked for safety
com.google.firebase.ai.DevAPIStreamingSnapshotTests ‑ short reply
com.google.firebase.ai.DevAPIStreamingSnapshotTests ‑ stopped for recitation
com.google.firebase.ai.DevAPIUnarySnapshotTests ‑ citation returns correctly
com.google.firebase.ai.DevAPIUnarySnapshotTests ‑ invalid api key
com.google.firebase.ai.DevAPIUnarySnapshotTests ‑ long reply
com.google.firebase.ai.DevAPIUnarySnapshotTests ‑ response blocked for safety
…

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 27, 2025

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 27, 2025

@rlazo rlazo merged commit 4e027a9 into main May 27, 2025
31 of 32 checks passed
@rlazo rlazo deleted the rpf/update-imagen-person-filter-refdocs branch May 27, 2025 17:18
@firebase firebase locked and limited conversation to collaborators Jun 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants