Skip to content
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

Wrap citations inside CitationMetadata #6276

Merged
merged 3 commits into from
Sep 19, 2024
Merged

Conversation

rlazo
Copy link
Collaborator

@rlazo rlazo commented Sep 19, 2024

We were previously unwrapping Citations within CitationMetadata, but we've decided to better align with the proto.

https://github.com/googleapis/googleapis/blob/7f9941f4ba22d6eb3bb7fa31f80aae3a1b3b957e/google/cloud/aiplatform/v1/content.proto#L346

b/368310789

We were previously unwrapping Citations within CitationMetadata, but
we've decided to better align with the proto.

b/368310789
Copy link
Contributor

github-actions bot commented Sep 19, 2024

Javadoc Changes:
--- /home/runner/diff/original/firebase-kotlindoc/android/client/firebase-vertexai/_toc.yaml	2024-09-19 16:20:32.315298655 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/client/firebase-vertexai/_toc.yaml	2024-09-19 16:18:23.769938008 +0000
@@ -47,6 +47,8 @@
       path: "/docs/reference/android/com/google/firebase/vertexai/type/BlobPart.html"
     - title: "Candidate"
       path: "/docs/reference/android/com/google/firebase/vertexai/type/Candidate.html"
+    - title: "Citation"
+      path: "/docs/reference/android/com/google/firebase/vertexai/type/Citation.html"
     - title: "CitationMetadata"
       path: "/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html"
     - title: "Content"
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/Candidate.html	2024-09-19 16:20:32.312298647 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/Candidate.html	2024-09-19 16:18:23.765937998 +0000
@@ -26,7 +26,7 @@
         </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://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="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html">CitationMetadata</a>&gt;</code></td>
+            <td><code>final <a href="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html">CitationMetadata</a></code></td>
             <td>
               <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/Candidate.html#citationMetadata()">citationMetadata</a></code></div>
             </td>
@@ -56,7 +56,7 @@
       <h2>Public fields</h2>
       <div class="api-item"><a name="getCitationMetadata()"></a><a name="setCitationMetadata()"></a><a name="getCitationMetadata--"></a><a name="setCitationMetadata--"></a>
         <h3 class="api-name" id="citationMetadata()">citationMetadata</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://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="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html">CitationMetadata</a>&gt;&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/Candidate.html#citationMetadata()">citationMetadata</a></pre>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html">CitationMetadata</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/Candidate.html#citationMetadata()">citationMetadata</a></pre>
       </div>
       <div class="api-item"><a name="getContent()"></a><a name="setContent()"></a><a name="getContent--"></a><a name="setContent--"></a>
         <h3 class="api-name" id="content()">content</h3>
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/Citation.html	1970-01-01 00:00:00.000000000 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/Citation.html	2024-09-19 16:18:23.764937995 +0000
@@ -0,0 +1,84 @@
+<html devsite="true">
+  <head>
+    <title>Citation</title>
+{% setvar book_path %}/_book.yaml{% endsetvar %}
+{% include "docs/reference/android/_reference-head-tags.html" %}
+  </head>
+  <body>
+    <div id="metadata-info-block"></div>
+    <h1>Citation</h1>
+    <p>
+      <pre>public final class <a href="/docs/reference/android/com/google/firebase/vertexai/type/Citation.html">Citation</a></pre>
+    </p>
+    <hr>
+    <p>Provides citation information for sourcing of content provided by the model between a given <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/Citation.html#startIndex()">startIndex</a></code> and <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/Citation.html#endIndex()">endIndex</a></code>.</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 int</code></td>
+            <td>
+              <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/Citation.html#endIndex()">endIndex</a></code></div>
+              <p>The exclusive end of a sequence in a model response that derives from a cited source.</p>
+            </td>
+          </tr>
+          <tr>
+            <td><code>final <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a></code></td>
+            <td>
+              <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/Citation.html#license()">license</a></code></div>
+              <p>The license the cited source work is distributed under, if specified.</p>
+            </td>
+          </tr>
+          <tr>
+            <td><code>final int</code></td>
+            <td>
+              <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/Citation.html#startIndex()">startIndex</a></code></div>
+              <p>The inclusive beginning of a sequence in a model response that derives from a cited source.</p>
+            </td>
+          </tr>
+          <tr>
+            <td><code>final <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a></code></td>
+            <td>
+              <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/Citation.html#uri()">uri</a></code></div>
+              <p>A link to the cited source, if available.</p>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="list">
+      <h2>Public fields</h2>
+      <div class="api-item"><a name="getEndIndex()"></a><a name="setEndIndex()"></a><a name="getEndIndex--"></a><a name="setEndIndex--"></a>
+        <h3 class="api-name" id="endIndex()">endIndex</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;int&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/Citation.html#endIndex()">endIndex</a></pre>
+        <p>The exclusive end of a sequence in a model response that derives from a cited source.</p>
+      </div>
+      <div class="api-item"><a name="getLicense()"></a><a name="setLicense()"></a><a name="getLicense--"></a><a name="setLicense--"></a>
+        <h3 class="api-name" id="license()">license</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;<a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/Citation.html#license()">license</a></pre>
+        <p>The license the cited source work is distributed under, if specified.</p>
+      </div>
+      <div class="api-item"><a name="getStartIndex()"></a><a name="setStartIndex()"></a><a name="getStartIndex--"></a><a name="setStartIndex--"></a>
+        <h3 class="api-name" id="startIndex()">startIndex</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;int&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/Citation.html#startIndex()">startIndex</a></pre>
+        <p>The inclusive beginning of a sequence in a model response that derives from a cited source.</p>
+      </div>
+      <div class="api-item"><a name="getUri()"></a><a name="setUri()"></a><a name="getUri--"></a><a name="setUri--"></a>
+        <h3 class="api-name" id="uri()">uri</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;<a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/Citation.html#uri()">uri</a></pre>
+        <p>A link to the cited source, if available.</p>
+      </div>
+    </div>
+  </body>
+</html>
+
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/CitationMetadata.html	2024-09-19 16:20:32.308298637 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/CitationMetadata.html	2024-09-19 16:18:23.762937990 +0000
@@ -11,7 +11,7 @@
       <pre>public final class <a href="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html">CitationMetadata</a></pre>
     </p>
     <hr>
-    <p>Provides citation metadata for sourcing of content provided by the model between a given <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html#startIndex()">startIndex</a></code> and <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html#endIndex()">endIndex</a></code>.</p>
+    <p>A collection of source attributions for a piece of content.</p>
     <h2>Summary</h2>
     <div class="devsite-table-wrapper">
       <table class="responsive">
@@ -26,31 +26,10 @@
         </thead>
         <tbody class="list">
           <tr>
-            <td><code>final int</code></td>
+            <td><code>final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <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="/docs/reference/android/com/google/firebase/vertexai/type/Citation.html">Citation</a>&gt;</code></td>
             <td>
-              <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html#endIndex()">endIndex</a></code></div>
-              <p>The end of the citation.</p>
-            </td>
-          </tr>
-          <tr>
-            <td><code>final <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a></code></td>
-            <td>
-              <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html#license()">license</a></code></div>
-              <p>The license under which the cited work is distributed.</p>
-            </td>
-          </tr>
-          <tr>
-            <td><code>final int</code></td>
-            <td>
-              <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html#startIndex()">startIndex</a></code></div>
-              <p>The beginning of the citation.</p>
-            </td>
-          </tr>
-          <tr>
-            <td><code>final <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a></code></td>
-            <td>
-              <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html#uri()">uri</a></code></div>
-              <p>The URI of the cited work.</p>
+              <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html#citations()">citations</a></code></div>
+              <p>A list of individual cited sources and the parts of the content to which they apply.</p>
             </td>
           </tr>
         </tbody>
@@ -58,25 +37,10 @@
     </div>
     <div class="list">
       <h2>Public fields</h2>
-      <div class="api-item"><a name="getEndIndex()"></a><a name="setEndIndex()"></a><a name="getEndIndex--"></a><a name="setEndIndex--"></a>
-        <h3 class="api-name" id="endIndex()">endIndex</h3>
-        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;int&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html#endIndex()">endIndex</a></pre>
-        <p>The end of the citation.</p>
-      </div>
-      <div class="api-item"><a name="getLicense()"></a><a name="setLicense()"></a><a name="getLicense--"></a><a name="setLicense--"></a>
-        <h3 class="api-name" id="license()">license</h3>
-        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;<a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html#license()">license</a></pre>
-        <p>The license under which the cited work is distributed.</p>
-      </div>
-      <div class="api-item"><a name="getStartIndex()"></a><a name="setStartIndex()"></a><a name="getStartIndex--"></a><a name="setStartIndex--"></a>
-        <h3 class="api-name" id="startIndex()">startIndex</h3>
-        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;int&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html#startIndex()">startIndex</a></pre>
-        <p>The beginning of the citation.</p>
-      </div>
-      <div class="api-item"><a name="getUri()"></a><a name="setUri()"></a><a name="getUri--"></a><a name="setUri--"></a>
-        <h3 class="api-name" id="uri()">uri</h3>
-        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;<a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html#uri()">uri</a></pre>
-        <p>The URI of the cited work.</p>
+      <div class="api-item"><a name="getCitations()"></a><a name="setCitations()"></a><a name="getCitations--"></a><a name="setCitations--"></a>
+        <h3 class="api-name" id="citations()">citations</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://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="/docs/reference/android/com/google/firebase/vertexai/type/Citation.html">Citation</a>&gt;&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html#citations()">citations</a></pre>
+        <p>A list of individual cited sources and the parts of the content to which they apply.</p>
       </div>
     </div>
   </body>
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/package-summary.html	2024-09-19 16:20:32.308298637 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/package-summary.html	2024-09-19 16:18:23.761937988 +0000
@@ -44,9 +44,15 @@
             </td>
           </tr>
           <tr>
+            <td><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/Citation.html">Citation</a></code></td>
+            <td>
+              <p>Provides citation information for sourcing of content provided by the model between a given <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/Citation.html#startIndex()">startIndex</a></code> and <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/Citation.html#endIndex()">endIndex</a></code>.</p>
+            </td>
+          </tr>
+          <tr>
             <td><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html">CitationMetadata</a></code></td>
             <td>
-              <p>Provides citation metadata for sourcing of content provided by the model between a given <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html#startIndex()">startIndex</a></code> and <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/CitationMetadata.html#endIndex()">endIndex</a></code>.</p>
+              <p>A collection of source attributions for a piece of content.</p>
             </td>
           </tr>
           <tr>
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/client/firebase-vertexai/_toc.yaml	2024-09-19 16:20:32.305298629 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/client/firebase-vertexai/_toc.yaml	2024-09-19 16:18:23.757937977 +0000
@@ -45,6 +45,8 @@
       path: "/docs/reference/kotlin/com/google/firebase/vertexai/type/BlobPart.html"
     - title: "Candidate"
       path: "/docs/reference/kotlin/com/google/firebase/vertexai/type/Candidate.html"
+    - title: "Citation"
+      path: "/docs/reference/kotlin/com/google/firebase/vertexai/type/Citation.html"
     - title: "CitationMetadata"
       path: "/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html"
     - title: "Content"
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/Candidate.html	2024-09-19 16:20:32.303298623 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/Candidate.html	2024-09-19 16:18:23.754937970 +0000
@@ -26,7 +26,7 @@
         </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="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html">CitationMetadata</a>&gt;</code></td>
+            <td><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html">CitationMetadata</a>?</code></td>
             <td>
               <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Candidate.html#citationMetadata()">citationMetadata</a></code></div>
             </td>
@@ -56,7 +56,7 @@
       <h2>Public properties</h2>
       <div class="api-item"><a name="getCitationMetadata()"></a><a name="setCitationMetadata()"></a><a name="getCitationMetadata--"></a><a name="setCitationMetadata--"></a>
         <h3 class="api-name" id="citationMetadata()">citationMetadata</h3>
-        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Candidate.html#citationMetadata()">citationMetadata</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html">CitationMetadata</a>&gt;</pre>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Candidate.html#citationMetadata()">citationMetadata</a>:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html">CitationMetadata</a>?</pre>
       </div>
       <div class="api-item"><a name="getContent()"></a><a name="setContent()"></a><a name="getContent--"></a><a name="setContent--"></a>
         <h3 class="api-name" id="content()">content</h3>
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/Citation.html	1970-01-01 00:00:00.000000000 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/Citation.html	2024-09-19 16:18:23.752937964 +0000
@@ -0,0 +1,84 @@
+<html devsite="true">
+  <head>
+    <title>Citation</title>
+{% setvar book_path %}/_book.yaml{% endsetvar %}
+{% include "docs/reference/kotlin/_reference-head-tags.html" %}
+  </head>
+  <body>
+    <div id="metadata-info-block"></div>
+    <h1>Citation</h1>
+    <p>
+      <pre>class <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Citation.html">Citation</a></pre>
+    </p>
+    <hr>
+    <p>Provides citation information for sourcing of content provided by the model between a given <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Citation.html#startIndex()">startIndex</a></code> and <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Citation.html#endIndex()">endIndex</a></code>.</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 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="/docs/reference/kotlin/com/google/firebase/vertexai/type/Citation.html#endIndex()">endIndex</a></code></div>
+              <p>The exclusive end of a sequence in a model response that derives from a cited source.</p>
+            </td>
+          </tr>
+          <tr>
+            <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>?</code></td>
+            <td>
+              <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Citation.html#license()">license</a></code></div>
+              <p>The license the cited source work is distributed under, if specified.</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="/docs/reference/kotlin/com/google/firebase/vertexai/type/Citation.html#startIndex()">startIndex</a></code></div>
+              <p>The inclusive beginning of a sequence in a model response that derives from a cited source.</p>
+            </td>
+          </tr>
+          <tr>
+            <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>?</code></td>
+            <td>
+              <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Citation.html#uri()">uri</a></code></div>
+              <p>A link to the cited source, if available.</p>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="list">
+      <h2>Public properties</h2>
+      <div class="api-item"><a name="getEndIndex()"></a><a name="setEndIndex()"></a><a name="getEndIndex--"></a><a name="setEndIndex--"></a>
+        <h3 class="api-name" id="endIndex()">endIndex</h3>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Citation.html#endIndex()">endIndex</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></pre>
+        <p>The exclusive end of a sequence in a model response that derives from a cited source.</p>
+      </div>
+      <div class="api-item"><a name="getLicense()"></a><a name="setLicense()"></a><a name="getLicense--"></a><a name="setLicense--"></a>
+        <h3 class="api-name" id="license()">license</h3>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Citation.html#license()">license</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>?</pre>
+        <p>The license the cited source work is distributed under, if specified.</p>
+      </div>
+      <div class="api-item"><a name="getStartIndex()"></a><a name="setStartIndex()"></a><a name="getStartIndex--"></a><a name="setStartIndex--"></a>
+        <h3 class="api-name" id="startIndex()">startIndex</h3>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Citation.html#startIndex()">startIndex</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></pre>
+        <p>The inclusive beginning of a sequence in a model response that derives from a cited source.</p>
+      </div>
+      <div class="api-item"><a name="getUri()"></a><a name="setUri()"></a><a name="getUri--"></a><a name="setUri--"></a>
+        <h3 class="api-name" id="uri()">uri</h3>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Citation.html#uri()">uri</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>?</pre>
+        <p>A link to the cited source, if available.</p>
+      </div>
+    </div>
+  </body>
+</html>
+
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html	2024-09-19 16:20:32.300298615 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html	2024-09-19 16:18:23.751937962 +0000
@@ -11,7 +11,7 @@
       <pre>class <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html">CitationMetadata</a></pre>
     </p>
     <hr>
-    <p>Provides citation metadata for sourcing of content provided by the model between a given <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html#startIndex()">startIndex</a></code> and <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html#endIndex()">endIndex</a></code>.</p>
+    <p>A collection of source attributions for a piece of content.</p>
     <h2>Summary</h2>
     <div class="devsite-table-wrapper">
       <table class="responsive">
@@ -26,31 +26,10 @@
         </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><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Citation.html">Citation</a>&gt;</code></td>
             <td>
-              <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html#endIndex()">endIndex</a></code></div>
-              <p>The end of the citation.</p>
-            </td>
-          </tr>
-          <tr>
-            <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>?</code></td>
-            <td>
-              <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html#license()">license</a></code></div>
-              <p>The license under which the cited work is distributed.</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="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html#startIndex()">startIndex</a></code></div>
-              <p>The beginning of the citation.</p>
-            </td>
-          </tr>
-          <tr>
-            <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>?</code></td>
-            <td>
-              <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html#uri()">uri</a></code></div>
-              <p>The URI of the cited work.</p>
+              <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html#citations()">citations</a></code></div>
+              <p>A list of individual cited sources and the parts of the content to which they apply.</p>
             </td>
           </tr>
         </tbody>
@@ -58,25 +37,10 @@
     </div>
     <div class="list">
       <h2>Public properties</h2>
-      <div class="api-item"><a name="getEndIndex()"></a><a name="setEndIndex()"></a><a name="getEndIndex--"></a><a name="setEndIndex--"></a>
-        <h3 class="api-name" id="endIndex()">endIndex</h3>
-        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html#endIndex()">endIndex</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></pre>
-        <p>The end of the citation.</p>
-      </div>
-      <div class="api-item"><a name="getLicense()"></a><a name="setLicense()"></a><a name="getLicense--"></a><a name="setLicense--"></a>
-        <h3 class="api-name" id="license()">license</h3>
-        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html#license()">license</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>?</pre>
-        <p>The license under which the cited work is distributed.</p>
-      </div>
-      <div class="api-item"><a name="getStartIndex()"></a><a name="setStartIndex()"></a><a name="getStartIndex--"></a><a name="setStartIndex--"></a>
-        <h3 class="api-name" id="startIndex()">startIndex</h3>
-        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html#startIndex()">startIndex</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></pre>
-        <p>The beginning of the citation.</p>
-      </div>
-      <div class="api-item"><a name="getUri()"></a><a name="setUri()"></a><a name="getUri--"></a><a name="setUri--"></a>
-        <h3 class="api-name" id="uri()">uri</h3>
-        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html#uri()">uri</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>?</pre>
-        <p>The URI of the cited work.</p>
+      <div class="api-item"><a name="getCitations()"></a><a name="setCitations()"></a><a name="getCitations--"></a><a name="setCitations--"></a>
+        <h3 class="api-name" id="citations()">citations</h3>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html#citations()">citations</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a>&lt;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Citation.html">Citation</a>&gt;</pre>
+        <p>A list of individual cited sources and the parts of the content to which they apply.</p>
       </div>
     </div>
   </body>
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/package-summary.html	2024-09-19 16:20:32.300298615 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/package-summary.html	2024-09-19 16:18:23.751937962 +0000
@@ -44,9 +44,15 @@
             </td>
           </tr>
           <tr>
+            <td><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Citation.html">Citation</a></code></td>
+            <td>
+              <p>Provides citation information for sourcing of content provided by the model between a given <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Citation.html#startIndex()">startIndex</a></code> and <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/Citation.html#endIndex()">endIndex</a></code>.</p>
+            </td>
+          </tr>
+          <tr>
             <td><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html">CitationMetadata</a></code></td>
             <td>
-              <p>Provides citation metadata for sourcing of content provided by the model between a given <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html#startIndex()">startIndex</a></code> and <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/CitationMetadata.html#endIndex()">endIndex</a></code>.</p>
+              <p>A collection of source attributions for a piece of content.</p>
             </td>
           </tr>
           <tr>

@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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Sep 19, 2024

Coverage Report 1

Affected Products

No changes between base commit (2326592) and merge commit (bcdff92).

Test Logs

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

Copy link
Contributor

github-actions bot commented Sep 19, 2024

Unit Test Results

  14 files   -     6    14 suites   - 6   15s ⏱️ -19s
106 tests +  83  106 ✔️ +  83  0 💤 ±0  0 ±0 
212 runs  +144  212 ✔️ +144  0 💤 ±0  0 ±0 

Results for commit 414da2d. ± Comparison against base commit 2326592.

This pull request removes 23 and adds 106 tests. Note that renamed tests count towards both.
com.google.firebase.functions.AppCheckLimitedUseTest ‑ FirebaseFunctions#getHttpsCallable should build callable with FAC settings (when false)
com.google.firebase.functions.AppCheckLimitedUseTest ‑ FirebaseFunctions#getHttpsCallable should build callable with FAC settings (when true)
com.google.firebase.functions.AppCheckLimitedUseTest ‑ FirebaseFunctions#getHttpsCallable should not use limited-use tokens by default
com.google.firebase.functions.AppCheckLimitedUseTest ‑ FirebaseFunctions#getHttpsCallableFromUrl callable with FAC settings (when false)
com.google.firebase.functions.AppCheckLimitedUseTest ‑ FirebaseFunctions#getHttpsCallableFromUrl callable with FAC settings (when true)
com.google.firebase.functions.AppCheckLimitedUseTest ‑ FirebaseFunctions#getHttpsCallableFromUrl should not use limited-use tokens by default
com.google.firebase.functions.FunctionsRegistrarTest ‑ getComponents_publishesLibVersionComponent
com.google.firebase.functions.FunctionsTests ‑ Firebase#functions should delegate to FirebaseFunctions#getInstance(FirebaseApp, region)
com.google.firebase.functions.FunctionsTests ‑ Firebase#functions should delegate to FirebaseFunctions#getInstance(region)
com.google.firebase.functions.FunctionsTests ‑ FirebaseApp#functions should delegate to FirebaseFunctions#getInstance(FirebaseApp)
…
com.google.firebase.vertexai.StreamingSnapshotTests ‑ citation parsed correctly
com.google.firebase.vertexai.StreamingSnapshotTests ‑ empty content
com.google.firebase.vertexai.StreamingSnapshotTests ‑ http errors
com.google.firebase.vertexai.StreamingSnapshotTests ‑ image rejected
com.google.firebase.vertexai.StreamingSnapshotTests ‑ invalid api key
com.google.firebase.vertexai.StreamingSnapshotTests ‑ invalid json
com.google.firebase.vertexai.StreamingSnapshotTests ‑ long reply
com.google.firebase.vertexai.StreamingSnapshotTests ‑ malformed content
com.google.firebase.vertexai.StreamingSnapshotTests ‑ prompt blocked for safety
com.google.firebase.vertexai.StreamingSnapshotTests ‑ prompt blocked for safety with message
…

♻️ This comment has been updated with latest results.

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.

For future reference, if you could include a link to the proto (as it's on github as well) with aligning efforts, that'd help a ton.

I'll also comment this in the bug.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Sep 19, 2024

@rlazo
Copy link
Collaborator Author

rlazo commented Sep 19, 2024

For future reference, if you could include a link to the proto (as it's on github as well) with aligning efforts, that'd help a ton.

I'll also comment this in the bug.

That's a great point. I've edited the description to include a link to the proto

@rlazo rlazo merged commit d0fa299 into main Sep 19, 2024
29 of 30 checks passed
@rlazo rlazo deleted the rl.citation.metadata.wrap branch September 19, 2024 17:56
@rlazo rlazo added this to the vertexai-ga milestone Sep 21, 2024
@firebase firebase locked and limited conversation to collaborators Oct 20, 2024
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.

3 participants