Skip to content

Conversation

VinayGuthal
Copy link
Contributor

@VinayGuthal VinayGuthal commented Apr 3, 2025

Update the connect method of LiveModelFutures class to return ListenableFuture instead of LiveSession.

This change reduces the burden on Java developers, as they would have to create a LiveSessionFutures object anyway.

Additionally, the startAudioConverstion method is now annotated with @JvmOverloads to maintain compatibility with Java.

Copy link
Contributor

github-actions bot commented Apr 3, 2025

Javadoc Changes:
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/java/LiveModelFutures.html	2025-04-15 19:12:56.427384469 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/java/LiveModelFutures.html	2025-04-15 19:10:41.712308921 +0000
@@ -65,10 +65,10 @@
         </thead>
         <tbody class="list">
           <tr>
-            <td><code>abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</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/LiveSession.html">LiveSession</a>&gt;</code></td>
+            <td><code>abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</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/java/LiveSessionFutures.html">LiveSessionFutures</a>&gt;</code></td>
             <td>
               <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/java/LiveModelFutures.html#connect()">connect</a>()</code></div>
-              <p>Start a <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html">LiveSession</a></code> with the server for bidirectional streaming.</p>
+              <p>Start a <code><a href="/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html">LiveSessionFutures</a></code> with the server for bidirectional streaming.</p>
             </td>
           </tr>
           <tr>
@@ -84,8 +84,8 @@
       <h2>Public methods</h2>
       <div class="api-item"><a name="connect--"></a><a name="connect"></a>
         <h3 class="api-name" id="connect()">connect</h3>
-        <pre class="api-signature no-pretty-print">public&nbsp;abstract&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</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/LiveSession.html">LiveSession</a>&gt;&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/java/LiveModelFutures.html#connect()">connect</a>()</pre>
-        <p>Start a <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html">LiveSession</a></code> with the server for bidirectional streaming.</p>
+        <pre class="api-signature no-pretty-print">public&nbsp;abstract&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</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/java/LiveSessionFutures.html">LiveSessionFutures</a>&gt;&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/java/LiveModelFutures.html#connect()">connect</a>()</pre>
+        <p>Start a <code><a href="/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html">LiveSessionFutures</a></code> with the server for bidirectional streaming.</p>
         <div class="devsite-table-wrapper">
           <table class="responsive">
             <colgroup>
@@ -99,9 +99,9 @@
             </thead>
             <tbody class="list">
               <tr>
-                <td><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</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/LiveSession.html">LiveSession</a>&gt;</code></td>
+                <td><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</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/java/LiveSessionFutures.html">LiveSessionFutures</a>&gt;</code></td>
                 <td>
-                  <p>A <code><a href="/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html">LiveSession</a></code> that you can use to stream messages to and from the server.</p>
+                  <p>A <code><a href="/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html">LiveSessionFutures</a></code> that you can use to stream messages to and from the server.</p>
                 </td>
               </tr>
             </tbody>
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/java/LiveSessionFutures.html	2025-04-15 19:12:56.426384484 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/java/LiveSessionFutures.html	2025-04-15 19:10:41.712308921 +0000
@@ -115,6 +115,13 @@
           <tr>
             <td><code>abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;</code></td>
             <td>
+              <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation()">startAudioConversation</a>()</code></div>
+              <p>Starts an audio conversation with the Gemini server, which can only be stopped using <code><a href="/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a></code>.</p>
+            </td>
+          </tr>
+          <tr>
+            <td><code>abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;</code></td>
+            <td>
               <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;Function1&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/FunctionCallPart.html">FunctionCallPart</a>,&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a>&gt;&nbsp;functionCallHandler<br>)</code></div>
               <p>Starts an audio conversation with the Gemini server, which can only be stopped using <code><a href="/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a></code>.</p>
             </td>
@@ -319,6 +326,11 @@
           </table>
         </div>
       </div>
+      <div class="api-item"><a name="startAudioConversation--"></a><a name="startaudioconversation"></a>
+        <h3 class="api-name" id="startAudioConversation()">startAudioConversation</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;abstract&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation()">startAudioConversation</a>()</pre>
+        <p>Starts an audio conversation with the Gemini server, which can only be stopped using <code><a href="/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a></code>.</p>
+      </div>
       <div class="api-item"><a name="startAudioConversation-kotlin.Function1-"></a><a name="startaudioconversation"></a>
         <h3 class="api-name" id="startAudioConversation(kotlin.Function1)">startAudioConversation</h3>
         <pre class="api-signature no-pretty-print">public&nbsp;abstract&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;Function1&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/FunctionCallPart.html">FunctionCallPart</a>,&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a>&gt;&nbsp;functionCallHandler<br>)</pre>
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html	2025-04-15 19:12:56.428384455 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html	2025-04-15 19:10:41.713308907 +0000
@@ -158,7 +158,7 @@
           <tr>
             <td><code>final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html">LiveGenerationConfig.Builder</a></code></td>
             <td>
-              <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html#setResponseModalities(com.google.firebase.vertexai.type.ResponseModality)">setResponseModalities</a>(<a href="/docs/reference/android/com/google/firebase/vertexai/type/ResponseModality.html">ResponseModality</a>&nbsp;responseModalities)</code></div>
+              <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html#setResponseModality(com.google.firebase.vertexai.type.ResponseModality)">setResponseModality</a>(<a href="/docs/reference/android/com/google/firebase/vertexai/type/ResponseModality.html">ResponseModality</a>&nbsp;responseModality)</code></div>
             </td>
           </tr>
           <tr>
@@ -266,9 +266,9 @@
         <h3 class="api-name" id="setPresencePenalty(kotlin.Float)">setPresencePenalty</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="/docs/reference/android/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html">LiveGenerationConfig.Builder</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html#setPresencePenalty(kotlin.Float)">setPresencePenalty</a>(<a href="https://developer.android.com/reference/kotlin/java/lang/Float.html">Float</a>&nbsp;presencePenalty)</pre>
       </div>
-      <div class="api-item"><a name="setResponseModalities-com.google.firebase.vertexai.type.ResponseModality-"></a><a name="setresponsemodalities"></a>
-        <h3 class="api-name" id="setResponseModalities(com.google.firebase.vertexai.type.ResponseModality)">setResponseModalities</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="/docs/reference/android/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html">LiveGenerationConfig.Builder</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html#setResponseModalities(com.google.firebase.vertexai.type.ResponseModality)">setResponseModalities</a>(<a href="/docs/reference/android/com/google/firebase/vertexai/type/ResponseModality.html">ResponseModality</a>&nbsp;responseModalities)</pre>
+      <div class="api-item"><a name="setResponseModality-com.google.firebase.vertexai.type.ResponseModality-"></a><a name="setresponsemodality"></a>
+        <h3 class="api-name" id="setResponseModality(com.google.firebase.vertexai.type.ResponseModality)">setResponseModality</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="/docs/reference/android/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html">LiveGenerationConfig.Builder</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html#setResponseModality(com.google.firebase.vertexai.type.ResponseModality)">setResponseModality</a>(<a href="/docs/reference/android/com/google/firebase/vertexai/type/ResponseModality.html">ResponseModality</a>&nbsp;responseModality)</pre>
       </div>
       <div class="api-item"><a name="setSpeechConfig-com.google.firebase.vertexai.type.SpeechConfig-"></a><a name="setspeechconfig"></a>
         <h3 class="api-name" id="setSpeechConfig(com.google.firebase.vertexai.type.SpeechConfig)">setSpeechConfig</h3>
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/ResponseModality.html	2025-04-15 19:12:56.433384383 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/ResponseModality.html	2025-04-15 19:10:41.719308820 +0000
@@ -67,13 +67,6 @@
             </td>
           </tr>
           <tr>
-            <td><code>static&nbsp;final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/ResponseModality.html">ResponseModality</a></code></td>
-            <td>
-              <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/ResponseModality.Companion.html#UNSPECIFIED()">UNSPECIFIED</a></code></div>
-              <p>Unspecified modality.</p>
-            </td>
-          </tr>
-          <tr>
             <td><code>final int</code></td>
             <td>
               <div><code><a href="/docs/reference/android/com/google/firebase/vertexai/type/ResponseModality.html#ordinal()">ordinal</a></code></div>
@@ -99,11 +92,6 @@
         <pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/vertexai/type/ResponseModality.html">ResponseModality</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/ResponseModality.Companion.html#TEXT()">TEXT</a></pre>
         <p>Represents a plain text response modality.</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="/docs/reference/android/com/google/firebase/vertexai/type/ResponseModality.html">ResponseModality</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/vertexai/type/ResponseModality.Companion.html#UNSPECIFIED()">UNSPECIFIED</a></pre>
-        <p>Unspecified modality.</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="/docs/reference/android/com/google/firebase/vertexai/type/ResponseModality.html#ordinal()">ordinal</a></pre>
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/java/LiveModelFutures.html	2025-04-15 19:12:56.418384598 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/java/LiveModelFutures.html	2025-04-15 19:10:41.702309066 +0000
@@ -66,10 +66,10 @@
         </thead>
         <tbody class="list">
           <tr>
-            <td><code>abstract <a href="/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a>&lt;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html">LiveSession</a>&gt;</code></td>
+            <td><code>abstract <a href="/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a>&lt;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html">LiveSessionFutures</a>&gt;</code></td>
             <td>
               <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveModelFutures.html#connect()">connect</a>()</code></div>
-              <p>Start a <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html">LiveSession</a></code> with the server for bidirectional streaming.</p>
+              <p>Start a <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html">LiveSessionFutures</a></code> with the server for bidirectional streaming.</p>
             </td>
           </tr>
         </tbody>
@@ -107,8 +107,8 @@
       <h2>Public functions</h2>
       <div class="api-item"><a name="connect--"></a><a name="connect"></a>
         <h3 class="api-name" id="connect()">connect</h3>
-        <pre class="api-signature no-pretty-print">abstract&nbsp;fun&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveModelFutures.html#connect()">connect</a>():&nbsp;<a href="/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a>&lt;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html">LiveSession</a>&gt;</pre>
-        <p>Start a <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html">LiveSession</a></code> with the server for bidirectional streaming.</p>
+        <pre class="api-signature no-pretty-print">abstract&nbsp;fun&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveModelFutures.html#connect()">connect</a>():&nbsp;<a href="/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a>&lt;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html">LiveSessionFutures</a>&gt;</pre>
+        <p>Start a <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html">LiveSessionFutures</a></code> with the server for bidirectional streaming.</p>
         <div class="devsite-table-wrapper">
           <table class="responsive">
             <colgroup>
@@ -122,9 +122,9 @@
             </thead>
             <tbody class="list">
               <tr>
-                <td><code><a href="/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a>&lt;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html">LiveSession</a>&gt;</code></td>
+                <td><code><a href="/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a>&lt;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html">LiveSessionFutures</a>&gt;</code></td>
                 <td>
-                  <p>A <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html">LiveSession</a></code> that you can use to stream messages to and from the server.</p>
+                  <p>A <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html">LiveSessionFutures</a></code> that you can use to stream messages to and from the server.</p>
                 </td>
               </tr>
             </tbody>
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html	2025-04-15 19:12:56.418384598 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html	2025-04-15 19:10:41.702309066 +0000
@@ -110,6 +110,13 @@
           <tr>
             <td><code>abstract <a href="/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;</code></td>
             <td>
+              <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation()">startAudioConversation</a>()</code></div>
+              <p>Starts an audio conversation with the Gemini server, which can only be stopped using <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a></code>.</p>
+            </td>
+          </tr>
+          <tr>
+            <td><code>abstract <a href="/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;</code></td>
+            <td>
               <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;functionCallHandler:&nbsp;((<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallPart.html">FunctionCallPart</a>) <span style="white-space: nowrap;">-&gt;</span> <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a>)?<br>)</code></div>
               <p>Starts an audio conversation with the Gemini server, which can only be stopped using <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a></code>.</p>
             </td>
@@ -317,6 +324,11 @@
           </table>
         </div>
       </div>
+      <div class="api-item"><a name="startAudioConversation--"></a><a name="startaudioconversation"></a>
+        <h3 class="api-name" id="startAudioConversation()">startAudioConversation</h3>
+        <pre class="api-signature no-pretty-print">abstract&nbsp;fun&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation()">startAudioConversation</a>():&nbsp;<a href="/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;</pre>
+        <p>Starts an audio conversation with the Gemini server, which can only be stopped using <code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a></code>.</p>
+      </div>
       <div class="api-item"><a name="startAudioConversation-kotlin.Function1-"></a><a name="startaudioconversation"></a>
         <h3 class="api-name" id="startAudioConversation(kotlin.Function1)">startAudioConversation</h3>
         <pre class="api-signature no-pretty-print">abstract&nbsp;fun&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;functionCallHandler:&nbsp;((<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallPart.html">FunctionCallPart</a>) <span style="white-space: nowrap;">-&gt;</span> <a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a>)?<br>):&nbsp;<a href="/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a>&lt;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;</pre>
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html	2025-04-15 19:12:56.419384584 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html	2025-04-15 19:10:41.703309052 +0000
@@ -80,7 +80,7 @@
           <tr>
             <td><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html">LiveGenerationConfig.Builder</a></code></td>
             <td>
-              <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html#setResponseModalities(com.google.firebase.vertexai.type.ResponseModality)">setResponseModalities</a>(responseModalities:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ResponseModality.html">ResponseModality</a>?)</code></div>
+              <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html#setResponseModality(com.google.firebase.vertexai.type.ResponseModality)">setResponseModality</a>(responseModality:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ResponseModality.html">ResponseModality</a>?)</code></div>
             </td>
           </tr>
           <tr>
@@ -218,9 +218,9 @@
         <h3 class="api-name" id="setPresencePenalty(kotlin.Float)">setPresencePenalty</h3>
         <pre class="api-signature no-pretty-print">fun&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html#setPresencePenalty(kotlin.Float)">setPresencePenalty</a>(presencePenalty:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>?):&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html">LiveGenerationConfig.Builder</a></pre>
       </div>
-      <div class="api-item"><a name="setResponseModalities-com.google.firebase.vertexai.type.ResponseModality-"></a><a name="setresponsemodalities"></a>
-        <h3 class="api-name" id="setResponseModalities(com.google.firebase.vertexai.type.ResponseModality)">setResponseModalities</h3>
-        <pre class="api-signature no-pretty-print">fun&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html#setResponseModalities(com.google.firebase.vertexai.type.ResponseModality)">setResponseModalities</a>(responseModalities:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ResponseModality.html">ResponseModality</a>?):&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html">LiveGenerationConfig.Builder</a></pre>
+      <div class="api-item"><a name="setResponseModality-com.google.firebase.vertexai.type.ResponseModality-"></a><a name="setresponsemodality"></a>
+        <h3 class="api-name" id="setResponseModality(com.google.firebase.vertexai.type.ResponseModality)">setResponseModality</h3>
+        <pre class="api-signature no-pretty-print">fun&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html#setResponseModality(com.google.firebase.vertexai.type.ResponseModality)">setResponseModality</a>(responseModality:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ResponseModality.html">ResponseModality</a>?):&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.Builder.html">LiveGenerationConfig.Builder</a></pre>
       </div>
       <div class="api-item"><a name="setSpeechConfig-com.google.firebase.vertexai.type.SpeechConfig-"></a><a name="setspeechconfig"></a>
         <h3 class="api-name" id="setSpeechConfig(com.google.firebase.vertexai.type.SpeechConfig)">setSpeechConfig</h3>
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/ResponseModality.html	2025-04-15 19:12:56.423384527 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/ResponseModality.html	2025-04-15 19:10:41.708308979 +0000
@@ -46,13 +46,6 @@
               <p>Represents a plain text response modality.</p>
             </td>
           </tr>
-          <tr>
-            <td><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ResponseModality.html">ResponseModality</a></code></td>
-            <td>
-              <div><code><a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ResponseModality.Companion.html#UNSPECIFIED()">UNSPECIFIED</a></code></div>
-              <p>Unspecified modality.</p>
-            </td>
-          </tr>
         </tbody>
       </table>
     </div>
@@ -94,11 +87,6 @@
         <pre class="api-signature no-pretty-print">val&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ResponseModality.Companion.html#TEXT()">TEXT</a>:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ResponseModality.html">ResponseModality</a></pre>
         <p>Represents a plain text response modality.</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="/docs/reference/kotlin/com/google/firebase/vertexai/type/ResponseModality.Companion.html#UNSPECIFIED()">UNSPECIFIED</a>:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/vertexai/type/ResponseModality.html">ResponseModality</a></pre>
-        <p>Unspecified modality.</p>
-      </div>
     </div>
     <div class="list">
       <h2>Public properties</h2>

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 3, 2025

Copy link
Contributor

github-actions bot commented Apr 3, 2025

Test Results

 18 files  + 18   18 suites  +18   14s ⏱️ +14s
 86 tests + 86   86 ✅ + 86  0 💤 ±0  0 ❌ ±0 
172 runs  +172  172 ✅ +172  0 💤 ±0  0 ❌ ±0 

Results for commit 33b7a90. ± Comparison against base commit 5aff679.

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-vertexai:
error: Method com.google.firebase.vertexai.java.LiveModelFutures.connect has changed return type from com.google.common.util.concurrent.ListenableFuture<com.google.firebase.vertexai.type.LiveSession> to com.google.common.util.concurrent.ListenableFuture<com.google.firebase.vertexai.java.LiveSessionFutures> [ChangedType]
error: Removed method com.google.firebase.vertexai.type.LiveGenerationConfig.Builder.setResponseModalities(com.google.firebase.vertexai.type.ResponseModality) [RemovedMethod]
error: Added method com.google.firebase.vertexai.type.LiveGenerationConfig.Builder.setResponseModality(com.google.firebase.vertexai.type.ResponseModality) [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.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 3, 2025

Size Report 1

Affected Products

  • firebase-vertexai

    TypeBase (5aff679)Merge (dd571e9)Diff
    aar769 kB770 kB+1.67 kB (+0.2%)
    apk (aggressive)1.53 MB1.53 MB-136 B (-0.0%)
    apk (release)9.49 MB9.49 MB+752 B (+0.0%)

Test Logs

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

Copy link
Collaborator

@rlazo rlazo left a comment

Choose a reason for hiding this comment

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

Have you tested this manually?

@VinayGuthal VinayGuthal changed the title Return session future instead of session Update LiveModelFutures to return LiveSessionFutures instead of LiveSession Apr 11, 2025
@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-vertexai:
error: Method com.google.firebase.vertexai.java.LiveModelFutures.connect has changed return type from com.google.common.util.concurrent.ListenableFuture<com.google.firebase.vertexai.type.LiveSession> to com.google.common.util.concurrent.ListenableFuture<com.google.firebase.vertexai.java.LiveSessionFutures> [ChangedType]
error: Removed method com.google.firebase.vertexai.type.LiveGenerationConfig.Builder.setResponseModalities(com.google.firebase.vertexai.type.ResponseModality) [RemovedMethod]
error: Added method com.google.firebase.vertexai.type.LiveGenerationConfig.Builder.setResponseModality(com.google.firebase.vertexai.type.ResponseModality) [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.

Copy link
Contributor

Vertex AI Mock Responses Check ⚠️

A newer major version of the mock responses for Vertex AI unit tests is available. update_responses.sh should be updated to clone the latest version of the responses: v10.0

@VinayGuthal VinayGuthal enabled auto-merge (squash) April 15, 2025 19:06
@VinayGuthal VinayGuthal merged commit 47e37b5 into main Apr 15, 2025
28 of 30 checks passed
@VinayGuthal VinayGuthal deleted the small_fixes branch April 15, 2025 19:13
@firebase firebase locked and limited conversation to collaborators May 16, 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.

3 participants