Skip to content

Add support for token-based usage metrics #6658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 8, 2025
Merged

Conversation

rlazo
Copy link
Collaborator

@rlazo rlazo commented Jan 30, 2025

Token measurement is broken down by modaliy, with separate counters for image, audio, etc.

Tests are in version 6.*, so this change also includes bumping update_responses.sh

Token measurement is broken down by modaliy, with separate counters for
image, audio, etc.

Tests are in version 6.*, so this change also includes bumping update_responses.sh
@rlazo rlazo requested review from daymxn and emilypgoogle January 30, 2025 23:38
Copy link
Contributor

github-actions bot commented Jan 30, 2025

Javadoc Changes:
--- /home/runner/diff/original/firebase-kotlindoc/android/client/firebase-vertexai/_toc.yaml	2025-02-08 03:34:27.321393953 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/client/firebase-vertexai/_toc.yaml	2025-02-08 03:32:21.411957472 +0000
@@ -54,6 +54,8 @@
       path: "/docs/reference/android/com/google/firebase/vertexai/type/Content.Builder.html"
     - title: "ContentKt"
       path: "/docs/reference/android/com/google/firebase/vertexai/type/ContentKt.html"
+    - title: "ContentModality"
+      path: "/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html"
     - title: "CountTokensResponse"
       path: "/docs/reference/android/com/google/firebase/vertexai/type/CountTokensResponse.html"
     - title: "FileDataPart"
@@ -90,6 +92,8 @@
       path: "/docs/reference/android/com/google/firebase/vertexai/type/ImagePart.html"
     - title: "InlineDataPart"
       path: "/docs/reference/android/com/google/firebase/vertexai/type/InlineDataPart.html"
+    - title: "ModalityTokenCount"
+      path: "/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html"
     - title: "PartKt"
       path: "/docs/reference/android/com/google/firebase/vertexai/type/PartKt.html"
     - title: "PromptFeedback"
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/ContentModality.Companion.html	1970-01-01 00:00:00.000000000 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/ContentModality.Companion.html	2025-02-08 03:32:21.417957496 +0000
@@ -0,0 +1,16 @@
+<html devsite="true">
+  <head>
+    <title>ContentModality.Companion</title>
+{% setvar book_path %}/_book.yaml{% endsetvar %}
+{% include "docs/reference/android/_reference-head-tags.html" %}
+  </head>
+  <body>
+    <div id="metadata-info-block"></div>
+    <h1>ContentModality.Companion</h1>
+    <p>
+      <pre>public static class <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.Companion.html">ContentModality.Companion</a></pre>
+    </p>
+    <hr>
+  </body>
+</html>
+
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/ContentModality.html	1970-01-01 00:00:00.000000000 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/ContentModality.html	2025-02-08 03:32:21.417957496 +0000
@@ -0,0 +1,138 @@
+<html devsite="true">
+  <head>
+    <title>ContentModality</title>
+{% setvar book_path %}/_book.yaml{% endsetvar %}
+{% include "docs/reference/android/_reference-head-tags.html" %}
+  </head>
+  <body>
+    <div id="metadata-info-block"></div>
+    <h1>ContentModality</h1>
+    <p>
+      <pre>public final class <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></pre>
+    </p>
+    <hr>
+    <p>Content part modality.</p>
+    <h2>Summary</h2>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Nested types</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td>
+              <div><code>public static class <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.Companion.html">ContentModality.Companion</a></code></div>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Public fields</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td><code>static&nbsp;final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.Companion.html#AUDIO()">AUDIO</a></code></div>
+              <p>Audio.</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="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.Companion.html#DOCUMENT()">DOCUMENT</a></code></div>
+              <p>Document, e.g.</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="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.Companion.html#IMAGE()">IMAGE</a></code></div>
+              <p>Image.</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="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.Companion.html#TEXT()">TEXT</a></code></div>
+              <p>Plain text.</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="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.Companion.html#UNSPECIFIED()">UNSPECIFIED</a></code></div>
+              <p>Unspecified modality.</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="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.Companion.html#VIDEO()">VIDEO</a></code></div>
+              <p>Video.</p>
+            </td>
+          </tr>
+          <tr>
+            <td><code>final int</code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html#ordinal()">ordinal</a></code></div>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="list">
+      <h2>Public fields</h2>
+      <div class="api-item"><a name="getAUDIO()"></a><a name="setAUDIO()"></a><a name="getAUDIO--"></a><a name="setAUDIO--"></a>
+        <h3 class="api-name" id="AUDIO()">AUDIO</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="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a>&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.Companion.html#AUDIO()">AUDIO</a></pre>
+        <p>Audio.</p>
+      </div>
+      <div class="api-item"><a name="getDOCUMENT()"></a><a name="setDOCUMENT()"></a><a name="getDOCUMENT--"></a><a name="setDOCUMENT--"></a>
+        <h3 class="api-name" id="DOCUMENT()">DOCUMENT</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="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a>&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.Companion.html#DOCUMENT()">DOCUMENT</a></pre>
+        <p>Document, e.g. PDF.</p>
+      </div>
+      <div class="api-item"><a name="getIMAGE()"></a><a name="setIMAGE()"></a><a name="getIMAGE--"></a><a name="setIMAGE--"></a>
+        <h3 class="api-name" id="IMAGE()">IMAGE</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="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a>&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.Companion.html#IMAGE()">IMAGE</a></pre>
+        <p>Image.</p>
+      </div>
+      <div class="api-item"><a name="getTEXT()"></a><a name="setTEXT()"></a><a name="getTEXT--"></a><a name="setTEXT--"></a>
+        <h3 class="api-name" id="TEXT()">TEXT</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="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a>&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.Companion.html#TEXT()">TEXT</a></pre>
+        <p>Plain text.</p>
+      </div>
+      <div class="api-item"><a name="getUNSPECIFIED()"></a><a name="setUNSPECIFIED()"></a><a name="getUNSPECIFIED--"></a><a name="setUNSPECIFIED--"></a>
+        <h3 class="api-name" id="UNSPECIFIED()">UNSPECIFIED</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="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a>&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.Companion.html#UNSPECIFIED()">UNSPECIFIED</a></pre>
+        <p>Unspecified modality.</p>
+      </div>
+      <div class="api-item"><a name="getVIDEO()"></a><a name="setVIDEO()"></a><a name="getVIDEO--"></a><a name="setVIDEO--"></a>
+        <h3 class="api-name" id="VIDEO()">VIDEO</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="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a>&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.Companion.html#VIDEO()">VIDEO</a></pre>
+        <p>Video.</p>
+      </div>
+      <div class="api-item"><a name="getOrdinal()"></a><a name="setOrdinal()"></a><a name="getOrdinal--"></a><a name="setOrdinal--"></a>
+        <h3 class="api-name" id="ordinal()">ordinal</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;int&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html#ordinal()">ordinal</a></pre>
+      </div>
+    </div>
+  </body>
+</html>
+
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/CountTokensResponse.html	2025-02-08 03:34:27.323393960 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/CountTokensResponse.html	2025-02-08 03:32:21.414957484 +0000
@@ -27,6 +27,13 @@
         </thead>
         <tbody class="list">
           <tr>
+            <td><code>final <a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;</code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/CountTokensResponse.html#promptTokensDetails()">promptTokensDetails</a></code></div>
+              <p>The breakdown, by modality, of how many tokens are consumed by the prompt.</p>
+            </td>
+          </tr>
+          <tr>
             <td><code>final <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a></code></td>
             <td>
               <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/CountTokensResponse.html#totalBillableCharacters()">totalBillableCharacters</a></code></div>
@@ -57,7 +64,7 @@
         <tbody class="list">
           <tr>
             <td>
-              <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/CountTokensResponse.html#CountTokensResponse(kotlin.Int,kotlin.Int)">CountTokensResponse</a>(int&nbsp;totalTokens,&nbsp;<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;totalBillableCharacters)</code></div>
+              <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/CountTokensResponse.html#CountTokensResponse(kotlin.Int,kotlin.Int,kotlin.collections.List)">CountTokensResponse</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;totalTokens,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;totalBillableCharacters,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;&nbsp;promptTokensDetails<br>)</code></div>
             </td>
           </tr>
         </tbody>
@@ -87,11 +94,22 @@
               <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/CountTokensResponse.html#component2()">component2</a>()</code></div>
             </td>
           </tr>
+          <tr>
+            <td><code>final <a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;</code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/CountTokensResponse.html#component3()">component3</a>()</code></div>
+            </td>
+          </tr>
         </tbody>
       </table>
     </div>
     <div class="list">
       <h2>Public fields</h2>
+      <div class="api-item"><a name="getPromptTokensDetails()"></a><a name="setPromptTokensDetails()"></a><a name="getPromptTokensDetails--"></a><a name="setPromptTokensDetails--"></a>
+        <h3 class="api-name" id="promptTokensDetails()">promptTokensDetails</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;<a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/CountTokensResponse.html#promptTokensDetails()">promptTokensDetails</a></pre>
+        <p>The breakdown, by modality, of how many tokens are consumed by the prompt.</p>
+      </div>
       <div class="api-item"><a name="getTotalBillableCharacters()"></a><a name="setTotalBillableCharacters()"></a><a name="getTotalBillableCharacters--"></a><a name="setTotalBillableCharacters--"></a>
         <h3 class="api-name" id="totalBillableCharacters()">totalBillableCharacters</h3>
         <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/CountTokensResponse.html#totalBillableCharacters()">totalBillableCharacters</a></pre>
@@ -105,9 +123,9 @@
     </div>
     <div class="list">
       <h2>Public constructors</h2>
-      <div class="api-item"><a name="CountTokensResponse(kotlin.Int, kotlin.Int)"></a><a name="CountTokensResponse-kotlin.Int-kotlin.Int-"></a><a name="counttokensresponse"></a>
-        <h3 class="api-name" id="CountTokensResponse(kotlin.Int,kotlin.Int)">CountTokensResponse</h3>
-        <pre class="api-signature no-pretty-print">public&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/CountTokensResponse.html#CountTokensResponse(kotlin.Int,kotlin.Int)">CountTokensResponse</a>(int&nbsp;totalTokens,&nbsp;<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;totalBillableCharacters)</pre>
+      <div class="api-item"><a name="CountTokensResponse(kotlin.Int, kotlin.Int, kotlin.collections.List)"></a><a name="CountTokensResponse-kotlin.Int-kotlin.Int-kotlin.collections.List-"></a><a name="counttokensresponse"></a>
+        <h3 class="api-name" id="CountTokensResponse(kotlin.Int,kotlin.Int,kotlin.collections.List)">CountTokensResponse</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/CountTokensResponse.html#CountTokensResponse(kotlin.Int,kotlin.Int,kotlin.collections.List)">CountTokensResponse</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;totalTokens,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;totalBillableCharacters,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;&nbsp;promptTokensDetails<br>)</pre>
       </div>
     </div>
     <div class="list">
@@ -120,6 +138,10 @@
         <h3 class="api-name" id="component2()">component2</h3>
         <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/CountTokensResponse.html#component2()">component2</a>()</pre>
       </div>
+      <div class="api-item"><a name="component3--"></a><a name="component3"></a>
+        <h3 class="api-name" id="component3()">component3</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;<a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/CountTokensResponse.html#component3()">component3</a>()</pre>
+      </div>
     </div>
   </body>
 </html>
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/ModalityTokenCount.html	1970-01-01 00:00:00.000000000 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/ModalityTokenCount.html	2025-02-08 03:32:21.412957476 +0000
@@ -0,0 +1,98 @@
+<html devsite="true">
+  <head>
+    <title>ModalityTokenCount</title>
+{% setvar book_path %}/_book.yaml{% endsetvar %}
+{% include "docs/reference/android/_reference-head-tags.html" %}
+  </head>
+  <body>
+    <div id="metadata-info-block"></div>
+    <h1>ModalityTokenCount</h1>
+    <p>
+      <pre>public final class <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a></pre>
+    </p>
+    <hr>
+    <p>Represents token counting info for a single modality.</p>
+    <h2>Summary</h2>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Public fields</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td><code>final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html#modality()">modality</a></code></div>
+              <p>The modality associated with this token count.</p>
+            </td>
+          </tr>
+          <tr>
+            <td><code>final int</code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html#tokenCount()">tokenCount</a></code></div>
+              <p>The number of tokens counted.</p>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Public methods</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td><code>final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html#component1()">component1</a>()</code></div>
+            </td>
+          </tr>
+          <tr>
+            <td><code>final int</code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html#component2()">component2</a>()</code></div>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="list">
+      <h2>Public fields</h2>
+      <div class="api-item"><a name="getModality()"></a><a name="setModality()"></a><a name="getModality--"></a><a name="setModality--"></a>
+        <h3 class="api-name" id="modality()">modality</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a>&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html#modality()">modality</a></pre>
+        <p>The modality associated with this token count.</p>
+      </div>
+      <div class="api-item"><a name="getTokenCount()"></a><a name="setTokenCount()"></a><a name="getTokenCount--"></a><a name="setTokenCount--"></a>
+        <h3 class="api-name" id="tokenCount()">tokenCount</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;int&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html#tokenCount()">tokenCount</a></pre>
+        <p>The number of tokens counted.</p>
+      </div>
+    </div>
+    <div class="list">
+      <h2>Public methods</h2>
+      <div class="api-item"><a name="component1--"></a><a name="component1"></a>
+        <h3 class="api-name" id="component1()">component1</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a>&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html#component1()">component1</a>()</pre>
+      </div>
+      <div class="api-item"><a name="component2--"></a><a name="component2"></a>
+        <h3 class="api-name" id="component2()">component2</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;int&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html#component2()">component2</a>()</pre>
+      </div>
+    </div>
+  </body>
+</html>
+
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/UsageMetadata.html	2025-02-08 03:34:27.323393960 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/UsageMetadata.html	2025-02-08 03:32:21.414957484 +0000
@@ -33,6 +33,13 @@
             </td>
           </tr>
           <tr>
+            <td><code>final <a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;</code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/UsageMetadata.html#candidatesTokensDetails()">candidatesTokensDetails</a></code></div>
+              <p>The breakdown, by modality, of how many tokens are consumed by the candidates.</p>
+            </td>
+          </tr>
+          <tr>
             <td><code>final int</code></td>
             <td>
               <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/UsageMetadata.html#promptTokenCount()">promptTokenCount</a></code></div>
@@ -40,6 +47,13 @@
             </td>
           </tr>
           <tr>
+            <td><code>final <a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;</code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/UsageMetadata.html#promptTokensDetails()">promptTokensDetails</a></code></div>
+              <p>The breakdown, by modality, of how many tokens are consumed by the prompt.</p>
+            </td>
+          </tr>
+          <tr>
             <td><code>final int</code></td>
             <td>
               <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/UsageMetadata.html#totalTokenCount()">totalTokenCount</a></code></div>
@@ -63,7 +77,7 @@
         <tbody class="list">
           <tr>
             <td>
-              <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/UsageMetadata.html#UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int)">UsageMetadata</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;promptTokenCount,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;candidatesTokenCount,<br>&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;totalTokenCount<br>)</code></div>
+              <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/UsageMetadata.html#UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.collections.List,kotlin.collections.List)">UsageMetadata</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;promptTokenCount,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;candidatesTokenCount,<br>&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;totalTokenCount,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;&nbsp;promptTokensDetails,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;&nbsp;candidatesTokensDetails<br>)</code></div>
             </td>
           </tr>
         </tbody>
@@ -76,11 +90,21 @@
         <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/UsageMetadata.html#candidatesTokenCount()">candidatesTokenCount</a></pre>
         <p>Number of tokens in the response(s).</p>
       </div>
+      <div class="api-item"><a name="getCandidatesTokensDetails()"></a><a name="setCandidatesTokensDetails()"></a><a name="getCandidatesTokensDetails--"></a><a name="setCandidatesTokensDetails--"></a>
+        <h3 class="api-name" id="candidatesTokensDetails()">candidatesTokensDetails</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;<a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/UsageMetadata.html#candidatesTokensDetails()">candidatesTokensDetails</a></pre>
+        <p>The breakdown, by modality, of how many tokens are consumed by the candidates.</p>
+      </div>
       <div class="api-item"><a name="getPromptTokenCount()"></a><a name="setPromptTokenCount()"></a><a name="getPromptTokenCount--"></a><a name="setPromptTokenCount--"></a>
         <h3 class="api-name" id="promptTokenCount()">promptTokenCount</h3>
         <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;int&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/UsageMetadata.html#promptTokenCount()">promptTokenCount</a></pre>
         <p>Number of tokens in the request.</p>
       </div>
+      <div class="api-item"><a name="getPromptTokensDetails()"></a><a name="setPromptTokensDetails()"></a><a name="getPromptTokensDetails--"></a><a name="setPromptTokensDetails--"></a>
+        <h3 class="api-name" id="promptTokensDetails()">promptTokensDetails</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;<a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/UsageMetadata.html#promptTokensDetails()">promptTokensDetails</a></pre>
+        <p>The breakdown, by modality, of how many tokens are consumed by the prompt.</p>
+      </div>
       <div class="api-item"><a name="getTotalTokenCount()"></a><a name="setTotalTokenCount()"></a><a name="getTotalTokenCount--"></a><a name="setTotalTokenCount--"></a>
         <h3 class="api-name" id="totalTokenCount()">totalTokenCount</h3>
         <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;int&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/UsageMetadata.html#totalTokenCount()">totalTokenCount</a></pre>
@@ -89,9 +113,9 @@
     </div>
     <div class="list">
       <h2>Public constructors</h2>
-      <div class="api-item"><a name="UsageMetadata(kotlin.Int, kotlin.Int, kotlin.Int)"></a><a name="UsageMetadata-kotlin.Int-kotlin.Int-kotlin.Int-"></a><a name="usagemetadata"></a>
-        <h3 class="api-name" id="UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int)">UsageMetadata</h3>
-        <pre class="api-signature no-pretty-print">public&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/UsageMetadata.html#UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int)">UsageMetadata</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;promptTokenCount,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;candidatesTokenCount,<br>&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;totalTokenCount<br>)</pre>
+      <div class="api-item"><a name="UsageMetadata(kotlin.Int, kotlin.Int, kotlin.Int, kotlin.collections.List, kotlin.collections.List)"></a><a name="UsageMetadata-kotlin.Int-kotlin.Int-kotlin.Int-kotlin.collections.List-kotlin.collections.List-"></a><a name="usagemetadata"></a>
+        <h3 class="api-name" id="UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.collections.List,kotlin.collections.List)">UsageMetadata</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/UsageMetadata.html#UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.collections.List,kotlin.collections.List)">UsageMetadata</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;promptTokenCount,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;candidatesTokenCount,<br>&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;totalTokenCount,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;&nbsp;promptTokensDetails,<br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;&nbsp;candidatesTokensDetails<br>)</pre>
         <div class="devsite-table-wrapper">
           <table class="responsive">
             <colgroup>
@@ -122,6 +146,18 @@
                   <p>Total number of tokens.</p>
                 </td>
               </tr>
+              <tr>
+                <td><code><a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;&nbsp;promptTokensDetails</code></td>
+                <td>
+                  <p>The breakdown, by modality, of how many tokens are consumed by the prompt.</p>
+                </td>
+              </tr>
+              <tr>
+                <td><code><a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a>&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;&nbsp;candidatesTokensDetails</code></td>
+                <td>
+                  <p>The breakdown, by modality, of how many tokens are consumed by the candidates.</p>
+                </td>
+              </tr>
             </tbody>
           </table>
         </div>
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/package-summary.html	2025-02-08 03:34:27.322393957 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/package-summary.html	2025-02-08 03:32:21.413957480 +0000
@@ -72,6 +72,12 @@
             <td></td>
           </tr>
           <tr>
+            <td><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></code></td>
+            <td>
+              <p>Content part modality.</p>
+            </td>
+          </tr>
+          <tr>
             <td><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/CountTokensResponse.html">CountTokensResponse</a></code></td>
             <td>
               <p>The model's response to a count tokens request.</p>
@@ -178,6 +184,12 @@
             </td>
           </tr>
           <tr>
+            <td><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a></code></td>
+            <td>
+              <p>Represents token counting info for a single modality.</p>
+            </td>
+          </tr>
+          <tr>
             <td><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/PartKt.html">PartKt</a></code></td>
             <td></td>
           </tr>
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/client/firebase-vertexai/_toc.yaml	2025-02-08 03:34:27.328393976 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/client/firebase-vertexai/_toc.yaml	2025-02-08 03:32:21.419957504 +0000
@@ -50,6 +50,8 @@
       path: "/docs/reference/kotlin/com/google/firebase/vertexai/type/Content.html"
     - title: "Content.Builder"
       path: "/docs/reference/kotlin/com/google/firebase/vertexai/type/Content.Builder.html"
+    - title: "ContentModality"
+      path: "/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html"
     - title: "CountTokensResponse"
       path: "/docs/reference/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.html"
     - title: "FileDataPart"
@@ -84,6 +86,8 @@
       path: "/docs/reference/kotlin/com/google/firebase/vertexai/type/ImagePart.html"
     - title: "InlineDataPart"
       path: "/docs/reference/kotlin/com/google/firebase/vertexai/type/InlineDataPart.html"
+    - title: "ModalityTokenCount"
+      path: "/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html"
     - title: "PromptFeedback"
       path: "/docs/reference/kotlin/com/google/firebase/vertexai/type/PromptFeedback.html"
     - title: "RequestOptions"
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/ContentModality.html	1970-01-01 00:00:00.000000000 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/ContentModality.html	2025-02-08 03:32:21.424957524 +0000
@@ -0,0 +1,136 @@
+<html devsite="true">
+  <head>
+    <title>ContentModality</title>
+{% setvar book_path %}/_book.yaml{% endsetvar %}
+{% include "docs/reference/kotlin/_reference-head-tags.html" %}
+  </head>
+  <body>
+    <div id="metadata-info-block"></div>
+    <h1>ContentModality</h1>
+    <p>
+      <pre>class <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></pre>
+    </p>
+    <hr>
+    <p>Content part modality.</p>
+    <h2>Summary</h2>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Public companion properties</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.Companion.html#AUDIO()">AUDIO</a></code></div>
+              <p>Audio.</p>
+            </td>
+          </tr>
+          <tr>
+            <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.Companion.html#DOCUMENT()">DOCUMENT</a></code></div>
+              <p>Document, e.g.</p>
+            </td>
+          </tr>
+          <tr>
+            <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.Companion.html#IMAGE()">IMAGE</a></code></div>
+              <p>Image.</p>
+            </td>
+          </tr>
+          <tr>
+            <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.Companion.html#TEXT()">TEXT</a></code></div>
+              <p>Plain text.</p>
+            </td>
+          </tr>
+          <tr>
+            <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.Companion.html#UNSPECIFIED()">UNSPECIFIED</a></code></div>
+              <p>Unspecified modality.</p>
+            </td>
+          </tr>
+          <tr>
+            <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.Companion.html#VIDEO()">VIDEO</a></code></div>
+              <p>Video.</p>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Public properties</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html#ordinal()">ordinal</a></code></div>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="list">
+      <h2>Public companion properties</h2>
+      <div class="api-item"><a name="getAUDIO()"></a><a name="setAUDIO()"></a><a name="getAUDIO--"></a><a name="setAUDIO--"></a>
+        <h3 class="api-name" id="AUDIO()">AUDIO</h3>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.Companion.html#AUDIO()">AUDIO</a>:&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></pre>
+        <p>Audio.</p>
+      </div>
+      <div class="api-item"><a name="getDOCUMENT()"></a><a name="setDOCUMENT()"></a><a name="getDOCUMENT--"></a><a name="setDOCUMENT--"></a>
+        <h3 class="api-name" id="DOCUMENT()">DOCUMENT</h3>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.Companion.html#DOCUMENT()">DOCUMENT</a>:&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></pre>
+        <p>Document, e.g. PDF.</p>
+      </div>
+      <div class="api-item"><a name="getIMAGE()"></a><a name="setIMAGE()"></a><a name="getIMAGE--"></a><a name="setIMAGE--"></a>
+        <h3 class="api-name" id="IMAGE()">IMAGE</h3>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.Companion.html#IMAGE()">IMAGE</a>:&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></pre>
+        <p>Image.</p>
+      </div>
+      <div class="api-item"><a name="getTEXT()"></a><a name="setTEXT()"></a><a name="getTEXT--"></a><a name="setTEXT--"></a>
+        <h3 class="api-name" id="TEXT()">TEXT</h3>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.Companion.html#TEXT()">TEXT</a>:&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></pre>
+        <p>Plain text.</p>
+      </div>
+      <div class="api-item"><a name="getUNSPECIFIED()"></a><a name="setUNSPECIFIED()"></a><a name="getUNSPECIFIED--"></a><a name="setUNSPECIFIED--"></a>
+        <h3 class="api-name" id="UNSPECIFIED()">UNSPECIFIED</h3>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.Companion.html#UNSPECIFIED()">UNSPECIFIED</a>:&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></pre>
+        <p>Unspecified modality.</p>
+      </div>
+      <div class="api-item"><a name="getVIDEO()"></a><a name="setVIDEO()"></a><a name="getVIDEO--"></a><a name="setVIDEO--"></a>
+        <h3 class="api-name" id="VIDEO()">VIDEO</h3>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.Companion.html#VIDEO()">VIDEO</a>:&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></pre>
+        <p>Video.</p>
+      </div>
+    </div>
+    <div class="list">
+      <h2>Public properties</h2>
+      <div class="api-item"><a name="getOrdinal()"></a><a name="setOrdinal()"></a><a name="getOrdinal--"></a><a name="setOrdinal--"></a>
+        <h3 class="api-name" id="ordinal()">ordinal</h3>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html#ordinal()">ordinal</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></pre>
+      </div>
+    </div>
+  </body>
+</html>
+
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.html	2025-02-08 03:34:27.330393982 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.html	2025-02-08 03:32:21.421957512 +0000
@@ -28,7 +28,7 @@
         <tbody class="list">
           <tr>
             <td>
-              <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.html#CountTokensResponse(kotlin.Int,kotlin.Int)">CountTokensResponse</a>(totalTokens:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,&nbsp;totalBillableCharacters:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?)</code></div>
+              <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.html#CountTokensResponse(kotlin.Int,kotlin.Int,kotlin.collections.List)">CountTokensResponse</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;totalTokens:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;totalBillableCharacters:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?,<br>&nbsp;&nbsp;&nbsp;&nbsp;promptTokensDetails:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;?<br>)</code></div>
             </td>
           </tr>
         </tbody>
@@ -58,6 +58,12 @@
               <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.html#component2()">component2</a>()</code></div>
             </td>
           </tr>
+          <tr>
+            <td><code>operator <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;?</code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.html#component3()">component3</a>()</code></div>
+            </td>
+          </tr>
         </tbody>
       </table>
     </div>
@@ -74,6 +80,13 @@
         </thead>
         <tbody class="list">
           <tr>
+            <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;?</code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.html#promptTokensDetails()">promptTokensDetails</a></code></div>
+              <p>The breakdown, by modality, of how many tokens are consumed by the prompt.</p>
+            </td>
+          </tr>
+          <tr>
             <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</code></td>
             <td>
               <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.html#totalBillableCharacters()">totalBillableCharacters</a></code></div>
@@ -92,9 +105,9 @@
     </div>
     <div class="list">
       <h2>Public constructors</h2>
-      <div class="api-item"><a name="CountTokensResponse(kotlin.Int, kotlin.Int)"></a><a name="CountTokensResponse-kotlin.Int-kotlin.Int-"></a><a name="counttokensresponse"></a>
-        <h3 class="api-name" id="CountTokensResponse(kotlin.Int,kotlin.Int)">CountTokensResponse</h3>
-        <pre class="api-signature no-pretty-print"><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.html#CountTokensResponse(kotlin.Int,kotlin.Int)">CountTokensResponse</a>(totalTokens:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,&nbsp;totalBillableCharacters:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>? = null)</pre>
+      <div class="api-item"><a name="CountTokensResponse(kotlin.Int, kotlin.Int, kotlin.collections.List)"></a><a name="CountTokensResponse-kotlin.Int-kotlin.Int-kotlin.collections.List-"></a><a name="counttokensresponse"></a>
+        <h3 class="api-name" id="CountTokensResponse(kotlin.Int,kotlin.Int,kotlin.collections.List)">CountTokensResponse</h3>
+        <pre class="api-signature no-pretty-print"><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.html#CountTokensResponse(kotlin.Int,kotlin.Int,kotlin.collections.List)">CountTokensResponse</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;totalTokens:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;totalBillableCharacters:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>? = null,<br>&nbsp;&nbsp;&nbsp;&nbsp;promptTokensDetails:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;? = null<br>)</pre>
       </div>
     </div>
     <div class="list">
@@ -107,9 +120,18 @@
         <h3 class="api-name" id="component2()">component2</h3>
         <pre class="api-signature no-pretty-print">operator&nbsp;fun&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.html#component2()">component2</a>():&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</pre>
       </div>
+      <div class="api-item"><a name="component3--"></a><a name="component3"></a>
+        <h3 class="api-name" id="component3()">component3</h3>
+        <pre class="api-signature no-pretty-print">operator&nbsp;fun&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.html#component3()">component3</a>():&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;?</pre>
+      </div>
     </div>
     <div class="list">
       <h2>Public properties</h2>
+      <div class="api-item"><a name="getPromptTokensDetails()"></a><a name="setPromptTokensDetails()"></a><a name="getPromptTokensDetails--"></a><a name="setPromptTokensDetails--"></a>
+        <h3 class="api-name" id="promptTokensDetails()">promptTokensDetails</h3>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.html#promptTokensDetails()">promptTokensDetails</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;?</pre>
+        <p>The breakdown, by modality, of how many tokens are consumed by the prompt.</p>
+      </div>
       <div class="api-item"><a name="getTotalBillableCharacters()"></a><a name="setTotalBillableCharacters()"></a><a name="getTotalBillableCharacters--"></a><a name="setTotalBillableCharacters--"></a>
         <h3 class="api-name" id="totalBillableCharacters()">totalBillableCharacters</h3>
         <pre class="api-signature no-pretty-print">val&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.html#totalBillableCharacters()">totalBillableCharacters</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</pre>
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html	1970-01-01 00:00:00.000000000 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html	2025-02-08 03:32:21.420957508 +0000
@@ -0,0 +1,98 @@
+<html devsite="true">
+  <head>
+    <title>ModalityTokenCount</title>
+{% setvar book_path %}/_book.yaml{% endsetvar %}
+{% include "docs/reference/kotlin/_reference-head-tags.html" %}
+  </head>
+  <body>
+    <div id="metadata-info-block"></div>
+    <h1>ModalityTokenCount</h1>
+    <p>
+      <pre>class <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a></pre>
+    </p>
+    <hr>
+    <p>Represents token counting info for a single modality.</p>
+    <h2>Summary</h2>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Public functions</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td><code>operator <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html#component1()">component1</a>()</code></div>
+            </td>
+          </tr>
+          <tr>
+            <td><code>operator <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html#component2()">component2</a>()</code></div>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Public properties</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html#modality()">modality</a></code></div>
+              <p>The modality associated with this token count.</p>
+            </td>
+          </tr>
+          <tr>
+            <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html#tokenCount()">tokenCount</a></code></div>
+              <p>The number of tokens counted.</p>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="list">
+      <h2>Public functions</h2>
+      <div class="api-item"><a name="component1--"></a><a name="component1"></a>
+        <h3 class="api-name" id="component1()">component1</h3>
+        <pre class="api-signature no-pretty-print">operator&nbsp;fun&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html#component1()">component1</a>():&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></pre>
+      </div>
+      <div class="api-item"><a name="component2--"></a><a name="component2"></a>
+        <h3 class="api-name" id="component2()">component2</h3>
+        <pre class="api-signature no-pretty-print">operator&nbsp;fun&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html#component2()">component2</a>():&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></pre>
+      </div>
+    </div>
+    <div class="list">
+      <h2>Public properties</h2>
+      <div class="api-item"><a name="getModality()"></a><a name="setModality()"></a><a name="getModality--"></a><a name="setModality--"></a>
+        <h3 class="api-name" id="modality()">modality</h3>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html#modality()">modality</a>:&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></pre>
+        <p>The modality associated with this token count.</p>
+      </div>
+      <div class="api-item"><a name="getTokenCount()"></a><a name="setTokenCount()"></a><a name="getTokenCount--"></a><a name="setTokenCount--"></a>
+        <h3 class="api-name" id="tokenCount()">tokenCount</h3>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html#tokenCount()">tokenCount</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></pre>
+        <p>The number of tokens counted.</p>
+      </div>
+    </div>
+  </body>
+</html>
+
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/UsageMetadata.html	2025-02-08 03:34:27.330393982 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/UsageMetadata.html	2025-02-08 03:32:21.421957512 +0000
@@ -27,7 +27,7 @@
         <tbody class="list">
           <tr>
             <td>
-              <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/UsageMetadata.html#UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int)">UsageMetadata</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;promptTokenCount:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;candidatesTokenCount:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?,<br>&nbsp;&nbsp;&nbsp;&nbsp;totalTokenCount:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><br>)</code></div>
+              <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/UsageMetadata.html#UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.collections.List,kotlin.collections.List)">UsageMetadata</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;promptTokenCount:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;candidatesTokenCount:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?,<br>&nbsp;&nbsp;&nbsp;&nbsp;totalTokenCount:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;promptTokensDetails:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;?,<br>&nbsp;&nbsp;&nbsp;&nbsp;candidatesTokensDetails:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;?<br>)</code></div>
             </td>
           </tr>
         </tbody>
@@ -53,6 +53,13 @@
             </td>
           </tr>
           <tr>
+            <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;?</code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/UsageMetadata.html#candidatesTokensDetails()">candidatesTokensDetails</a></code></div>
+              <p>The breakdown, by modality, of how many tokens are consumed by the candidates.</p>
+            </td>
+          </tr>
+          <tr>
             <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></code></td>
             <td>
               <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/UsageMetadata.html#promptTokenCount()">promptTokenCount</a></code></div>
@@ -60,6 +67,13 @@
             </td>
           </tr>
           <tr>
+            <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;?</code></td>
+            <td>
+              <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/UsageMetadata.html#promptTokensDetails()">promptTokensDetails</a></code></div>
+              <p>The breakdown, by modality, of how many tokens are consumed by the prompt.</p>
+            </td>
+          </tr>
+          <tr>
             <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></code></td>
             <td>
               <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/UsageMetadata.html#totalTokenCount()">totalTokenCount</a></code></div>
@@ -71,9 +85,9 @@
     </div>
     <div class="list">
       <h2>Public constructors</h2>
-      <div class="api-item"><a name="UsageMetadata(kotlin.Int, kotlin.Int, kotlin.Int)"></a><a name="UsageMetadata-kotlin.Int-kotlin.Int-kotlin.Int-"></a><a name="usagemetadata"></a>
-        <h3 class="api-name" id="UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int)">UsageMetadata</h3>
-        <pre class="api-signature no-pretty-print"><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/UsageMetadata.html#UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int)">UsageMetadata</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;promptTokenCount:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;candidatesTokenCount:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?,<br>&nbsp;&nbsp;&nbsp;&nbsp;totalTokenCount:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><br>)</pre>
+      <div class="api-item"><a name="UsageMetadata(kotlin.Int, kotlin.Int, kotlin.Int, kotlin.collections.List, kotlin.collections.List)"></a><a name="UsageMetadata-kotlin.Int-kotlin.Int-kotlin.Int-kotlin.collections.List-kotlin.collections.List-"></a><a name="usagemetadata"></a>
+        <h3 class="api-name" id="UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.collections.List,kotlin.collections.List)">UsageMetadata</h3>
+        <pre class="api-signature no-pretty-print"><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/UsageMetadata.html#UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.collections.List,kotlin.collections.List)">UsageMetadata</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;promptTokenCount:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;candidatesTokenCount:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?,<br>&nbsp;&nbsp;&nbsp;&nbsp;totalTokenCount:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;promptTokensDetails:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;?,<br>&nbsp;&nbsp;&nbsp;&nbsp;candidatesTokensDetails:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;?<br>)</pre>
         <div class="devsite-table-wrapper">
           <table class="responsive">
             <colgroup>
@@ -104,6 +118,18 @@
                   <p>Total number of tokens.</p>
                 </td>
               </tr>
+              <tr>
+                <td><code>promptTokensDetails:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;?</code></td>
+                <td>
+                  <p>The breakdown, by modality, of how many tokens are consumed by the prompt.</p>
+                </td>
+              </tr>
+              <tr>
+                <td><code>candidatesTokensDetails:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;?</code></td>
+                <td>
+                  <p>The breakdown, by modality, of how many tokens are consumed by the candidates.</p>
+                </td>
+              </tr>
             </tbody>
           </table>
         </div>
@@ -116,11 +142,21 @@
         <pre class="api-signature no-pretty-print">val&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/UsageMetadata.html#candidatesTokenCount()">candidatesTokenCount</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</pre>
         <p>Number of tokens in the response(s).</p>
       </div>
+      <div class="api-item"><a name="getCandidatesTokensDetails()"></a><a name="setCandidatesTokensDetails()"></a><a name="getCandidatesTokensDetails--"></a><a name="setCandidatesTokensDetails--"></a>
+        <h3 class="api-name" id="candidatesTokensDetails()">candidatesTokensDetails</h3>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/UsageMetadata.html#candidatesTokensDetails()">candidatesTokensDetails</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;?</pre>
+        <p>The breakdown, by modality, of how many tokens are consumed by the candidates.</p>
+      </div>
       <div class="api-item"><a name="getPromptTokenCount()"></a><a name="setPromptTokenCount()"></a><a name="getPromptTokenCount--"></a><a name="setPromptTokenCount--"></a>
         <h3 class="api-name" id="promptTokenCount()">promptTokenCount</h3>
         <pre class="api-signature no-pretty-print">val&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/UsageMetadata.html#promptTokenCount()">promptTokenCount</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></pre>
         <p>Number of tokens in the request.</p>
       </div>
+      <div class="api-item"><a name="getPromptTokensDetails()"></a><a name="setPromptTokensDetails()"></a><a name="getPromptTokensDetails--"></a><a name="setPromptTokensDetails--"></a>
+        <h3 class="api-name" id="promptTokensDetails()">promptTokensDetails</h3>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/UsageMetadata.html#promptTokensDetails()">promptTokensDetails</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a>&gt;?</pre>
+        <p>The breakdown, by modality, of how many tokens are consumed by the prompt.</p>
+      </div>
       <div class="api-item"><a name="getTotalTokenCount()"></a><a name="setTotalTokenCount()"></a><a name="getTotalTokenCount--"></a><a name="setTotalTokenCount--"></a>
         <h3 class="api-name" id="totalTokenCount()">totalTokenCount</h3>
         <pre class="api-signature no-pretty-print">val&nbsp;<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/UsageMetadata.html#totalTokenCount()">totalTokenCount</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></pre>
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/package-summary.html	2025-02-08 03:34:27.329393979 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/package-summary.html	2025-02-08 03:32:21.421957512 +0000
@@ -68,6 +68,12 @@
             </td>
           </tr>
           <tr>
+            <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ContentModality.html">ContentModality</a></code></td>
+            <td>
+              <p>Content part modality.</p>
+            </td>
+          </tr>
+          <tr>
             <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.html">CountTokensResponse</a></code></td>
             <td>
               <p>The model's response to a count tokens request.</p>
@@ -170,6 +176,12 @@
             </td>
           </tr>
           <tr>
+            <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.html">ModalityTokenCount</a></code></td>
+            <td>
+              <p>Represents token counting info for a single modality.</p>
+            </td>
+          </tr>
+          <tr>
             <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/PromptFeedback.html">PromptFeedback</a></code></td>
             <td>
               <p>Feedback on the prompt provided in the request.</p>

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jan 30, 2025

Copy link
Contributor

github-actions bot commented Jan 30, 2025

Test Results

 20 files   -  1 014   20 suites   - 1 014   12s ⏱️ - 34m 8s
114 tests  -  5 774  114 ✅  -  5 752  0 💤  - 22  0 ❌ ±0 
228 runs   - 11 611  228 ✅  - 11 567  0 💤  - 44  0 ❌ ±0 

Results for commit 1d21728. ± Comparison against base commit 336cf32.

This pull request removes 5776 and adds 2 tests. Note that renamed tests count towards both.
com.google.android.datatransport.cct.CctBackendFactoryTest ‑ create_returnCCTBackend_WhenBackendNameIsCCT
com.google.android.datatransport.cct.CctDestinationTest ‑ cctDestination_shouldOnlySupportProtoAndJson
com.google.android.datatransport.cct.CctDestinationTest ‑ cctDestination_shouldSupportProtoAndJson
com.google.android.datatransport.cct.CctTransportBackendTest ‑ decorate_whenOffline_shouldProperlyPopulateNetworkInfo
com.google.android.datatransport.cct.CctTransportBackendTest ‑ decorate_whenOnline_shouldProperlyPopulateNetworkInfo
com.google.android.datatransport.cct.CctTransportBackendTest ‑ schedule_shouldAddCookieOnPseudonymousIds
com.google.android.datatransport.cct.CctTransportBackendTest ‑ schedule_shouldDropCookieOnMixedPseudonymousIds
com.google.android.datatransport.cct.CctTransportBackendTest ‑ send_CompressedResponseIsUncompressed
com.google.android.datatransport.cct.CctTransportBackendTest ‑ send_whenBackendRedirectsMoreThan5Times_shouldOnlyRedirect4Times
com.google.android.datatransport.cct.CctTransportBackendTest ‑ send_whenBackendRedirects_shouldCorrectlyFollowTheRedirectViaPost
…
com.google.firebase.vertexai.UnarySnapshotTests ‑ countTokens with modality fields returned
com.google.firebase.vertexai.UnarySnapshotTests ‑ response with detailed token-based usageMetadata

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jan 30, 2025

Size Report 1

Affected Products

  • firebase-vertexai

    TypeBase (336cf32)Merge (52c9564)Diff
    aar490 kB508 kB+17.4 kB (+3.5%)
    apk (aggressive)1.36 MB1.37 MB+8.59 kB (+0.6%)
    apk (release)9.30 MB9.31 MB+13.0 kB (+0.1%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/7l1gZcWuEo.html

rlazo added 2 commits January 31, 2025 11:07
There are other possible classes that will use the same Modality name
@rlazo rlazo requested a review from thatfiredev February 1, 2025 00:38
Copy link
Member

@daymxn daymxn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but left some comments that might wanna be addressed before merging.

Oh, and don't forget to add a release note!!

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-vertexai:
error: Added class com.google.firebase.vertexai.type.ContentModality [AddedClass]
error: Removed constructor com.google.firebase.vertexai.type.CountTokensResponse(int,Integer) [RemovedMethod]
error: Added constructor com.google.firebase.vertexai.type.CountTokensResponse(int,Integer,java.util.List<com.google.firebase.vertexai.type.ModalityTokenCount>) [AddedMethod]
error: Added method com.google.firebase.vertexai.type.CountTokensResponse.component3() [AddedMethod]
error: Added method com.google.firebase.vertexai.type.CountTokensResponse.getPromptTokensDetails() [AddedMethod]
error: Added class com.google.firebase.vertexai.type.ModalityTokenCount [AddedClass]
error: Removed constructor com.google.firebase.vertexai.type.UsageMetadata(int,Integer,int) [RemovedMethod]
error: Added constructor com.google.firebase.vertexai.type.UsageMetadata(int,Integer,int,java.util.List<com.google.firebase.vertexai.type.ModalityTokenCount>,java.util.List<com.google.firebase.vertexai.type.ModalityTokenCount>) [AddedMethod]
error: Added method com.google.firebase.vertexai.type.UsageMetadata.getCandidatesTokensDetails() [AddedMethod]
error: Added method com.google.firebase.vertexai.type.UsageMetadata.getPromptTokensDetails() [AddedMethod]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

1 similar comment
@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-vertexai:
error: Added class com.google.firebase.vertexai.type.ContentModality [AddedClass]
error: Removed constructor com.google.firebase.vertexai.type.CountTokensResponse(int,Integer) [RemovedMethod]
error: Added constructor com.google.firebase.vertexai.type.CountTokensResponse(int,Integer,java.util.List<com.google.firebase.vertexai.type.ModalityTokenCount>) [AddedMethod]
error: Added method com.google.firebase.vertexai.type.CountTokensResponse.component3() [AddedMethod]
error: Added method com.google.firebase.vertexai.type.CountTokensResponse.getPromptTokensDetails() [AddedMethod]
error: Added class com.google.firebase.vertexai.type.ModalityTokenCount [AddedClass]
error: Removed constructor com.google.firebase.vertexai.type.UsageMetadata(int,Integer,int) [RemovedMethod]
error: Added constructor com.google.firebase.vertexai.type.UsageMetadata(int,Integer,int,java.util.List<com.google.firebase.vertexai.type.ModalityTokenCount>,java.util.List<com.google.firebase.vertexai.type.ModalityTokenCount>) [AddedMethod]
error: Added method com.google.firebase.vertexai.type.UsageMetadata.getCandidatesTokensDetails() [AddedMethod]
error: Added method com.google.firebase.vertexai.type.UsageMetadata.getPromptTokensDetails() [AddedMethod]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

rlazo added 3 commits February 7, 2025 21:44
- update api.txt
- bump version
- Add missing kdoc

A note about api.txt and version. While this change is technically
removing two methods, those are constructors of classes returned by
the server, which shouldn't be instantiated by clients.

In an upcoming breaking release we should moved them to be hidden
using the `internal` visibility.
@rlazo rlazo enabled auto-merge (squash) February 8, 2025 03:26
@rlazo rlazo merged commit d9baf9e into main Feb 8, 2025
29 checks passed
@rlazo rlazo deleted the rl.token.count.modality branch February 8, 2025 03:35
@firebase firebase locked and limited conversation to collaborators Mar 11, 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