-
Notifications
You must be signed in to change notification settings - Fork 606
Refactor live bidi #6870
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
Refactor live bidi #6870
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Javadoc Changes:--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/java/LiveSessionFutures.html 2025-04-15 19:53:48.336185625 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/java/LiveSessionFutures.html 2025-04-15 19:51:39.409021278 +0000
@@ -81,55 +81,55 @@
<td><code>abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/org/reactivestreams/Publisher.html">Publisher</a><@<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/LiveContentResponse.html">LiveContentResponse</a>></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#receive()">receive</a>()</code></div>
- <p>Receives responses from the server for both streaming and standard requests.</p>
+ <p>Receives responses from the model for both streaming and standard requests.</p>
</td>
</tr>
<tr>
<td><code>abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#send(com.google.firebase.vertexai.type.Content)">send</a>(@<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/Content.html">Content</a> content)</code></div>
- <p>Sends <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/Content.html">data</a></code> to the server.</p>
+ <p>Sends <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/Content.html">data</a></code> to the model.</p>
</td>
</tr>
<tr>
<td><code>abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#send(kotlin.String)">send</a>(@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a> text)</code></div>
- <p>Sends text to the server</p>
+ <p>Sends text to the model.</p>
</td>
</tr>
<tr>
<td><code>abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#sendFunctionResponse(kotlin.collections.List)">sendFunctionResponse</a>(<br> @<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><@<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/FunctionResponsePart.html">FunctionResponsePart</a>> functionList<br>)</code></div>
- <p>Sends the function response from the client to the server.</p>
+ <p>Sends function calling responses to the model.</p>
</td>
</tr>
<tr>
<td><code>abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#sendMediaStream(kotlin.collections.List)">sendMediaStream</a>(@<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><@<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/MediaData.html">MediaData</a>> mediaChunks)</code></div>
- <p>Streams client data to the server.</p>
+ <p>Streams client data to the model.</p>
</td>
</tr>
<tr>
<td><code>abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></code></td>
<td>
- <div><code><a href="/https/github.com/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="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a></code>.</p>
+ <div><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission.html">RequiresPermission</a>(value = "android.permission.RECORD_AUDIO")<br><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation()">startAudioConversation</a>()</code></div>
+ <p>Starts an audio conversation with the model, which can only be stopped using <code><a href="/https/github.com/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="/https/github.com/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a>(<br> Function1<@<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/FunctionCallPart.html">FunctionCallPart</a>, @<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/FunctionResponsePart.html">FunctionResponsePart</a>> functionCallHandler<br>)</code></div>
- <p>Starts an audio conversation with the Gemini server, which can only be stopped using <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a></code>.</p>
+ <p>Starts an audio conversation with the model, which can only be stopped using <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a></code> or <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#close()">close</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="/https/github.com/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></code></td>
<td>
- <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a>()</code></div>
+ <div><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission.html">RequiresPermission</a>(value = "android.permission.RECORD_AUDIO")<br><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a>()</code></div>
<p>Stops the audio conversation with the Gemini Server.</p>
</td>
</tr>
@@ -137,7 +137,7 @@
<td><code>abstract void</code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopReceiving()">stopReceiving</a>()</code></div>
- <p>Stop receiving from the server.</p>
+ <p>Stops receiving from the model.</p>
</td>
</tr>
</tbody>
@@ -149,6 +149,26 @@
<h3 class="api-name" id="close()">close</h3>
<pre class="api-signature no-pretty-print">public abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#close()">close</a>()</pre>
<p>Closes the client session.</p>
+ <p>Once a <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html">LiveSession</a></code> is closed, it can not be reopened; you'll need to start a new <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html">LiveSession</a></code>.</p>
+ <div class="devsite-table-wrapper">
+ <table class="responsive">
+ <colgroup>
+ <col width="40%">
+ <col>
+ </colgroup>
+ <thead>
+ <tr>
+ <th colspan="100%">See also</th>
+ </tr>
+ </thead>
+ <tbody class="list">
+ <tr>
+ <td><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopReceiving()">stopReceiving</a></code></td>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
</div>
<div class="api-item"><a name="from-com.google.firebase.vertexai.type.LiveSession-"></a><a name="from"></a>
<h3 class="api-name" id="from(com.google.firebase.vertexai.type.LiveSession)">from</h3>
@@ -178,7 +198,8 @@
<div class="api-item"><a name="receive--"></a><a name="receive"></a>
<h3 class="api-name" id="receive()">receive</h3>
<pre class="api-signature no-pretty-print">public abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/org/reactivestreams/Publisher.html">Publisher</a><@<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/LiveContentResponse.html">LiveContentResponse</a>> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#receive()">receive</a>()</pre>
- <p>Receives responses from the server for both streaming and standard requests.</p>
+ <p>Receives responses from the model for both streaming and standard requests.</p>
+ <p>Call <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#close()">close</a></code> to stop receiving responses from the model.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -194,7 +215,7 @@
<tr>
<td><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/org/reactivestreams/Publisher.html">Publisher</a><@<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/LiveContentResponse.html">LiveContentResponse</a>></code></td>
<td>
- <p>A <code><a href="/https/github.com/docs/reference/android/org/reactivestreams/Publisher.html">Publisher</a></code> which will emit <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveContentResponse.html">LiveContentResponse</a></code> as and when it receives it.</p>
+ <p>A <code><a href="/https/github.com/docs/reference/android/org/reactivestreams/Publisher.html">Publisher</a></code> which will emit <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveContentResponse.html">LiveContentResponse</a></code> from the model.</p>
</td>
</tr>
</tbody>
@@ -215,17 +236,37 @@
<tr>
<td><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/SessionAlreadyReceivingException.html">com.google.firebase.vertexai.type.SessionAlreadyReceivingException</a> com.google.firebase.vertexai.type.SessionAlreadyReceivingException</code></td>
<td>
- <p>When the session is already receiving.</p>
+ <p>when the session is already receiving.</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%">See also</th>
+ </tr>
+ </thead>
+ <tbody class="list">
+ <tr>
+ <td><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopReceiving()">stopReceiving</a></code></td>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
</div>
<div class="api-item"><a name="send-com.google.firebase.vertexai.type.Content-"></a><a name="send"></a>
<h3 class="api-name" id="send(com.google.firebase.vertexai.type.Content)">send</h3>
<pre class="api-signature no-pretty-print">public abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#send(com.google.firebase.vertexai.type.Content)">send</a>(@<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/Content.html">Content</a> content)</pre>
- <p>Sends <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/Content.html">data</a></code> to the server.</p>
+ <p>Sends <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/Content.html">data</a></code> to the model.</p>
+ <p>Calling this after <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code> will play the response audio immediately.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -241,7 +282,7 @@
<tr>
<td><code>@<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/Content.html">Content</a> content</code></td>
<td>
- <p>Client <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/Content.html">Content</a></code> to be sent to the server.</p>
+ <p>Client <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/Content.html">Content</a></code> to be sent to the model.</p>
</td>
</tr>
</tbody>
@@ -251,7 +292,8 @@
<div class="api-item"><a name="send-kotlin.String-"></a><a name="send"></a>
<h3 class="api-name" id="send(kotlin.String)">send</h3>
<pre class="api-signature no-pretty-print">public abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#send(kotlin.String)">send</a>(@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a> text)</pre>
- <p>Sends text to the server</p>
+ <p>Sends text to the model.</p>
+ <p>Calling this after <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code> will play the response audio immediately.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -267,7 +309,7 @@
<tr>
<td><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a> text</code></td>
<td>
- <p>Text to be sent to the server.</p>
+ <p>Text to be sent to the model.</p>
</td>
</tr>
</tbody>
@@ -277,7 +319,7 @@
<div class="api-item"><a name="sendFunctionResponse-kotlin.collections.List-"></a><a name="sendfunctionresponse"></a>
<h3 class="api-name" id="sendFunctionResponse(kotlin.collections.List)">sendFunctionResponse</h3>
<pre class="api-signature no-pretty-print">public abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#sendFunctionResponse(kotlin.collections.List)">sendFunctionResponse</a>(<br> @<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><@<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/FunctionResponsePart.html">FunctionResponsePart</a>> functionList<br>)</pre>
- <p>Sends the function response from the client to the server.</p>
+ <p>Sends function calling responses to the model.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -303,7 +345,8 @@
<div class="api-item"><a name="sendMediaStream-kotlin.collections.List-"></a><a name="sendmediastream"></a>
<h3 class="api-name" id="sendMediaStream(kotlin.collections.List)">sendMediaStream</h3>
<pre class="api-signature no-pretty-print">public abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#sendMediaStream(kotlin.collections.List)">sendMediaStream</a>(@<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><@<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/MediaData.html">MediaData</a>> mediaChunks)</pre>
- <p>Streams client data to the server.</p>
+ <p>Streams client data to the model.</p>
+ <p>Calling this after <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code> will play the response audio immediately.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -328,13 +371,13 @@
</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 abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> <a href="/https/github.com/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="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a></code>.</p>
+ <pre class="api-signature no-pretty-print">@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission.html">RequiresPermission</a>(value = "android.permission.RECORD_AUDIO")<br>public abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation()">startAudioConversation</a>()</pre>
+ <p>Starts an audio conversation with the model, which can only be stopped using <code><a href="/https/github.com/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 abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a>(<br> Function1<@<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/FunctionCallPart.html">FunctionCallPart</a>, @<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/FunctionResponsePart.html">FunctionResponsePart</a>> functionCallHandler<br>)</pre>
- <p>Starts an audio conversation with the Gemini server, which can only be stopped using <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a></code>.</p>
+ <p>Starts an audio conversation with the model, which can only be stopped using <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a></code> or <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#close()">close</a></code>.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -350,7 +393,7 @@
<tr>
<td><code>Function1<@<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/FunctionCallPart.html">FunctionCallPart</a>, @<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/FunctionResponsePart.html">FunctionResponsePart</a>> functionCallHandler</code></td>
<td>
- <p>A callback function to map function calls from the server to their response parts.</p>
+ <p>A callback function that is invoked whenever the model receives a function call.</p>
</td>
</tr>
</tbody>
@@ -359,8 +402,17 @@
</div>
<div class="api-item"><a name="stopAudioConversation--"></a><a name="stopaudioconversation"></a>
<h3 class="api-name" id="stopAudioConversation()">stopAudioConversation</h3>
- <pre class="api-signature no-pretty-print">public abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a>()</pre>
+ <pre class="api-signature no-pretty-print">@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission.html">RequiresPermission</a>(value = "android.permission.RECORD_AUDIO")<br>public abstract @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a>()</pre>
<p>Stops the audio conversation with the Gemini Server.</p>
+ <p>This only needs to be called after a previous call to <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code>.</p>
+ <p>If there is no audio conversation currently active, this function does nothing.</p>
+ </div>
+ <div class="api-item"><a name="stopReceiving--"></a><a name="stopreceiving"></a>
+ <h3 class="api-name" id="stopReceiving()">stopReceiving</h3>
+ <pre class="api-signature no-pretty-print">public abstract void <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopReceiving()">stopReceiving</a>()</pre>
+ <p>Stops receiving from the model.</p>
+ <p>If this function is called during an ongoing audio conversation, the model's response will not be received, and no audio will be played; the live session object will no longer receive data from the server.</p>
+ <p>To resume receiving data, you must either handle it directly using <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#receive()">receive</a></code>, or indirectly by using <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code>.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -374,22 +426,13 @@
</thead>
<tbody class="list">
<tr>
- <td><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code></td>
- <td></td>
- </tr>
- <tr>
- <td><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopReceiving()">stopReceiving</a></code></td>
+ <td><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#close()">close</a></code></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
- <div class="api-item"><a name="stopReceiving--"></a><a name="stopreceiving"></a>
- <h3 class="api-name" id="stopReceiving()">stopReceiving</h3>
- <pre class="api-signature no-pretty-print">public abstract void <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopReceiving()">stopReceiving</a>()</pre>
- <p>Stop receiving from the server.</p>
- </div>
</div>
</body>
</html> --- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/LiveGenerationConfig.html 2025-04-15 19:53:48.341185751 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/LiveGenerationConfig.html 2025-04-15 19:51:39.415021540 +0000
@@ -11,7 +11,7 @@
<pre>@<a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/PublicPreviewAPI.html">PublicPreviewAPI</a><br>public final class <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveGenerationConfig.html">LiveGenerationConfig</a></pre>
</p>
<hr>
- <p>Configuration parameters to use for content generation.</p>
+ <p>Configuration parameters to use for live content generation.</p>
<h2>Summary</h2>
<div class="devsite-table-wrapper">
<table class="responsive"> --- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/LiveSession.html 2025-04-15 19:53:48.337185650 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/LiveSession.html 2025-04-15 19:51:39.410021322 +0000
@@ -36,49 +36,49 @@
<td><code>final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html">Flow</a><@<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/LiveContentResponse.html">LiveContentResponse</a>></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#receive()">receive</a>()</code></div>
- <p>Receives responses from the server for both streaming and standard requests.</p>
+ <p>Receives responses from the model for both streaming and standard requests.</p>
</td>
</tr>
<tr>
<td><code>final void</code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#send(com.google.firebase.vertexai.type.Content)">send</a>(@<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/Content.html">Content</a> content)</code></div>
- <p>Sends data to the server.</p>
+ <p>Sends <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/Content.html">data</a></code> to the model.</p>
</td>
</tr>
<tr>
<td><code>final void</code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#send(kotlin.String)">send</a>(@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a> text)</code></div>
- <p>Sends text to the server.</p>
+ <p>Sends text to the model.</p>
</td>
</tr>
<tr>
<td><code>final void</code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#sendFunctionResponse(kotlin.collections.List)">sendFunctionResponse</a>(<br> @<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><@<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/FunctionResponsePart.html">FunctionResponsePart</a>> functionList<br>)</code></div>
- <p>Sends the function calling responses to the server.</p>
+ <p>Sends function calling responses to the model.</p>
</td>
</tr>
<tr>
<td><code>final void</code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#sendMediaStream(kotlin.collections.List)">sendMediaStream</a>(@<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><@<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/MediaData.html">MediaData</a>> mediaChunks)</code></div>
- <p>Streams client data to the server.</p>
+ <p>Streams client data to the model.</p>
</td>
</tr>
<tr>
<td><code>final void</code></td>
<td>
- <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a>(<br> Function1<@<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/FunctionCallPart.html">FunctionCallPart</a>, @<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/FunctionResponsePart.html">FunctionResponsePart</a>> functionCallHandler<br>)</code></div>
- <p>Starts an audio conversation with the Gemini server, which can only be stopped using <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#stopAudioConversation()">stopAudioConversation</a></code>.</p>
+ <div><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission.html">RequiresPermission</a>(value = "android.permission.RECORD_AUDIO")<br><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a>(<br> Function1<@<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/FunctionCallPart.html">FunctionCallPart</a>, @<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/FunctionResponsePart.html">FunctionResponsePart</a>> functionCallHandler<br>)</code></div>
+ <p>Starts an audio conversation with the model, which can only be stopped using <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#stopAudioConversation()">stopAudioConversation</a></code> or <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#close()">close</a></code>.</p>
</td>
</tr>
<tr>
<td><code>final void</code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#stopAudioConversation()">stopAudioConversation</a>()</code></div>
- <p>Stops the audio conversation with the Gemini Server.</p>
+ <p>Stops the audio conversation with the model.</p>
</td>
</tr>
<tr>
@@ -97,12 +97,32 @@
<h3 class="api-name" id="close()">close</h3>
<pre class="api-signature no-pretty-print">public final void <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#close()">close</a>()</pre>
<p>Closes the client session.</p>
- <p>After this is called, the session object becomes unusable. To interact with the server again, you must create a new session using <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/LiveGenerativeModel.html">LiveGenerativeModel</a></code>.</p>
+ <p>Once a <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html">LiveSession</a></code> is closed, it can not be reopened; you'll need to start a new <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html">LiveSession</a></code>.</p>
+ <div class="devsite-table-wrapper">
+ <table class="responsive">
+ <colgroup>
+ <col width="40%">
+ <col>
+ </colgroup>
+ <thead>
+ <tr>
+ <th colspan="100%">See also</th>
+ </tr>
+ </thead>
+ <tbody class="list">
+ <tr>
+ <td><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#stopReceiving()">stopReceiving</a></code></td>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
</div>
<div class="api-item"><a name="receive--"></a><a name="receive"></a>
<h3 class="api-name" id="receive()">receive</h3>
<pre class="api-signature no-pretty-print">public final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html">Flow</a><@<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/LiveContentResponse.html">LiveContentResponse</a>> <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#receive()">receive</a>()</pre>
- <p>Receives responses from the server for both streaming and standard requests. Call <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#stopReceiving()">stopReceiving</a></code> to stop receiving responses from the server.</p>
+ <p>Receives responses from the model for both streaming and standard requests.</p>
+ <p>Call <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#close()">close</a></code> to stop receiving responses from the model.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -118,7 +138,7 @@
<tr>
<td><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html">Flow</a><@<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/LiveContentResponse.html">LiveContentResponse</a>></code></td>
<td>
- <p>A <code><a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html">Flow</a></code> which will emit <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveContentResponse.html">LiveContentResponse</a></code> as and when it receives it</p>
+ <p>A <code><a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html">Flow</a></code> which will emit <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveContentResponse.html">LiveContentResponse</a></code> from the model.</p>
</td>
</tr>
</tbody>
@@ -145,11 +165,31 @@
</tbody>
</table>
</div>
+ <div class="devsite-table-wrapper">
+ <table class="responsive">
+ <colgroup>
+ <col width="40%">
+ <col>
+ </colgroup>
+ <thead>
+ <tr>
+ <th colspan="100%">See also</th>
+ </tr>
+ </thead>
+ <tbody class="list">
+ <tr>
+ <td><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#stopReceiving()">stopReceiving</a></code></td>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
</div>
<div class="api-item"><a name="send-com.google.firebase.vertexai.type.Content-"></a><a name="send"></a>
<h3 class="api-name" id="send(com.google.firebase.vertexai.type.Content)">send</h3>
<pre class="api-signature no-pretty-print">public final void <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#send(com.google.firebase.vertexai.type.Content)">send</a>(@<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/Content.html">Content</a> content)</pre>
- <p>Sends data to the server. Calling this after <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code> will play the response audio immediately.</p>
+ <p>Sends <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/Content.html">data</a></code> to the model.</p>
+ <p>Calling this after <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code> will play the response audio immediately.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -165,7 +205,7 @@
<tr>
<td><code>@<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/Content.html">Content</a> content</code></td>
<td>
- <p>Client <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/Content.html">Content</a></code> to be sent to the server.</p>
+ <p>Client <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/Content.html">Content</a></code> to be sent to the model.</p>
</td>
</tr>
</tbody>
@@ -175,7 +215,8 @@
<div class="api-item"><a name="send-kotlin.String-"></a><a name="send"></a>
<h3 class="api-name" id="send(kotlin.String)">send</h3>
<pre class="api-signature no-pretty-print">public final void <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#send(kotlin.String)">send</a>(@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a> text)</pre>
- <p>Sends text to the server. Calling this after <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code> will play the response audio immediately.</p>
+ <p>Sends text to the model.</p>
+ <p>Calling this after <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code> will play the response audio immediately.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -191,7 +232,7 @@
<tr>
<td><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/lang/String.html">String</a> text</code></td>
<td>
- <p>Text to be sent to the server.</p>
+ <p>Text to be sent to the model.</p>
</td>
</tr>
</tbody>
@@ -201,7 +242,8 @@
<div class="api-item"><a name="sendFunctionResponse-kotlin.collections.List-"></a><a name="sendfunctionresponse"></a>
<h3 class="api-name" id="sendFunctionResponse(kotlin.collections.List)">sendFunctionResponse</h3>
<pre class="api-signature no-pretty-print">public final void <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#sendFunctionResponse(kotlin.collections.List)">sendFunctionResponse</a>(<br> @<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><@<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/FunctionResponsePart.html">FunctionResponsePart</a>> functionList<br>)</pre>
- <p>Sends the function calling responses to the server.</p>
+ <p>Sends function calling responses to the model.</p>
+ <p><b>NOTE:</b> If you're using <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code>, the method will handle sending function responses to the model for you. You do <em>not</em> need to call this method in that case.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -227,7 +269,8 @@
<div class="api-item"><a name="sendMediaStream-kotlin.collections.List-"></a><a name="sendmediastream"></a>
<h3 class="api-name" id="sendMediaStream(kotlin.collections.List)">sendMediaStream</h3>
<pre class="api-signature no-pretty-print">public final void <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#sendMediaStream(kotlin.collections.List)">sendMediaStream</a>(@<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><@<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/MediaData.html">MediaData</a>> mediaChunks)</pre>
- <p>Streams client data to the server. Calling this after <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code> will play the response audio immediately.</p>
+ <p>Streams client data to the model.</p>
+ <p>Calling this after <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code> will play the response audio immediately.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -252,8 +295,8 @@
</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 final void <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a>(<br> Function1<@<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/FunctionCallPart.html">FunctionCallPart</a>, @<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/FunctionResponsePart.html">FunctionResponsePart</a>> functionCallHandler<br>)</pre>
- <p>Starts an audio conversation with the Gemini server, which can only be stopped using <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#stopAudioConversation()">stopAudioConversation</a></code>.</p>
+ <pre class="api-signature no-pretty-print">@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission.html">RequiresPermission</a>(value = "android.permission.RECORD_AUDIO")<br>public final void <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a>(<br> Function1<@<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/FunctionCallPart.html">FunctionCallPart</a>, @<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/FunctionResponsePart.html">FunctionResponsePart</a>> functionCallHandler<br>)</pre>
+ <p>Starts an audio conversation with the model, which can only be stopped using <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#stopAudioConversation()">stopAudioConversation</a></code> or <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#close()">close</a></code>.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -269,7 +312,7 @@
<tr>
<td><code>Function1<@<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/FunctionCallPart.html">FunctionCallPart</a>, @<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/FunctionResponsePart.html">FunctionResponsePart</a>> functionCallHandler</code></td>
<td>
- <p>A callback function that is invoked whenever the server receives a function call.</p>
+ <p>A callback function that is invoked whenever the model receives a function call. The <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a></code> that the callback function returns will be automatically sent to the model.</p>
</td>
</tr>
</tbody>
@@ -279,7 +322,9 @@
<div class="api-item"><a name="stopAudioConversation--"></a><a name="stopaudioconversation"></a>
<h3 class="api-name" id="stopAudioConversation()">stopAudioConversation</h3>
<pre class="api-signature no-pretty-print">public final void <a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#stopAudioConversation()">stopAudioConversation</a>()</pre>
- <p>Stops the audio conversation with the Gemini Server. This needs to be called only after calling <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code></p>
+ <p>Stops the audio conversation with the model.</p>
+ <p>This only needs to be called after a previous call to <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code>.</p>
+ <p>If there is no audio conversation currently active, this function does nothing.</p>
</div>
<div class="api-item"><a name="stopReceiving--"></a><a name="stopreceiving"></a>
<h3 class="api-name" id="stopReceiving()">stopReceiving</h3>
@@ -287,6 +332,25 @@
<p>Stops receiving from the model.</p>
<p>If this function is called during an ongoing audio conversation, the model's response will not be received, and no audio will be played; the live session object will no longer receive data from the server.</p>
<p>To resume receiving data, you must either handle it directly using <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#receive()">receive</a></code>, or indirectly by using <code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code>.</p>
+ <div class="devsite-table-wrapper">
+ <table class="responsive">
+ <colgroup>
+ <col width="40%">
+ <col>
+ </colgroup>
+ <thead>
+ <tr>
+ <th colspan="100%">See also</th>
+ </tr>
+ </thead>
+ <tbody class="list">
+ <tr>
+ <td><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveSession.html#close()">close</a></code></td>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
</div>
</div>
</body> --- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/vertexai/type/package-summary.html 2025-04-15 19:53:48.340185726 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/vertexai/type/package-summary.html 2025-04-15 19:51:39.414021496 +0000
@@ -269,7 +269,7 @@
<tr>
<td><code><a href="/https/github.com/docs/reference/android/com/google/firebase/vertexai/type/LiveGenerationConfig.html">LiveGenerationConfig</a></code></td>
<td>
- <p>Configuration parameters to use for content generation.</p>
+ <p>Configuration parameters to use for live content generation.</p>
</td>
</tr>
<tr> --- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html 2025-04-15 19:53:48.327185399 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html 2025-04-15 19:51:39.399020843 +0000
@@ -76,55 +76,55 @@
<td><code>abstract <a href="/https/github.com/docs/reference/kotlin/org/reactivestreams/Publisher.html">Publisher</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.html">LiveContentResponse</a>></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#receive()">receive</a>()</code></div>
- <p>Receives responses from the server for both streaming and standard requests.</p>
+ <p>Receives responses from the model for both streaming and standard requests.</p>
</td>
</tr>
<tr>
<td><code>abstract <a href="/https/github.com/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#send(com.google.firebase.vertexai.type.Content)">send</a>(content: <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/Content.html">Content</a>)</code></div>
- <p>Sends <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/Content.html">data</a></code> to the server.</p>
+ <p>Sends <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/Content.html">data</a></code> to the model.</p>
</td>
</tr>
<tr>
<td><code>abstract <a href="/https/github.com/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#send(kotlin.String)">send</a>(text: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>)</code></div>
- <p>Sends text to the server</p>
+ <p>Sends text to the model.</p>
</td>
</tr>
<tr>
<td><code>abstract <a href="/https/github.com/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#sendFunctionResponse(kotlin.collections.List)">sendFunctionResponse</a>(functionList: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a>>)</code></div>
- <p>Sends the function response from the client to the server.</p>
+ <p>Sends function calling responses to the model.</p>
</td>
</tr>
<tr>
<td><code>abstract <a href="/https/github.com/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#sendMediaStream(kotlin.collections.List)">sendMediaStream</a>(mediaChunks: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/MediaData.html">MediaData</a>>)</code></div>
- <p>Streams client data to the server.</p>
+ <p>Streams client data to the model.</p>
</td>
</tr>
<tr>
<td><code>abstract <a href="/https/github.com/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></code></td>
<td>
- <div><code><a href="/https/github.com/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="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a></code>.</p>
+ <div><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission.html">RequiresPermission</a>(value = "android.permission.RECORD_AUDIO")<br><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation()">startAudioConversation</a>()</code></div>
+ <p>Starts an audio conversation with the model, which can only be stopped using <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a></code>.</p>
</td>
</tr>
<tr>
<td><code>abstract <a href="/https/github.com/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a>(<br> functionCallHandler: ((<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallPart.html">FunctionCallPart</a>) <span style="white-space: nowrap;">-></span> <a href="/https/github.com/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="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a></code>.</p>
+ <p>Starts an audio conversation with the model, which can only be stopped using <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a></code> or <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#close()">close</a></code>.</p>
</td>
</tr>
<tr>
<td><code>abstract <a href="/https/github.com/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></code></td>
<td>
- <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a>()</code></div>
+ <div><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission.html">RequiresPermission</a>(value = "android.permission.RECORD_AUDIO")<br><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a>()</code></div>
<p>Stops the audio conversation with the Gemini Server.</p>
</td>
</tr>
@@ -132,7 +132,7 @@
<td><code>abstract <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopReceiving()">stopReceiving</a>()</code></div>
- <p>Stop receiving from the server.</p>
+ <p>Stops receiving from the model.</p>
</td>
</tr>
</tbody>
@@ -172,11 +172,32 @@
<h3 class="api-name" id="close()">close</h3>
<pre class="api-signature no-pretty-print">abstract fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#close()">close</a>(): <a href="/https/github.com/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></pre>
<p>Closes the client session.</p>
+ <p>Once a <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html">LiveSession</a></code> is closed, it can not be reopened; you'll need to start a new <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html">LiveSession</a></code>.</p>
+ <div class="devsite-table-wrapper">
+ <table class="responsive">
+ <colgroup>
+ <col width="40%">
+ <col>
+ </colgroup>
+ <thead>
+ <tr>
+ <th colspan="100%">See also</th>
+ </tr>
+ </thead>
+ <tbody class="list">
+ <tr>
+ <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopReceiving()">stopReceiving</a></code></td>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
</div>
<div class="api-item"><a name="receive--"></a><a name="receive"></a>
<h3 class="api-name" id="receive()">receive</h3>
<pre class="api-signature no-pretty-print">abstract fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#receive()">receive</a>(): <a href="/https/github.com/docs/reference/kotlin/org/reactivestreams/Publisher.html">Publisher</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.html">LiveContentResponse</a>></pre>
- <p>Receives responses from the server for both streaming and standard requests.</p>
+ <p>Receives responses from the model for both streaming and standard requests.</p>
+ <p>Call <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#close()">close</a></code> to stop receiving responses from the model.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -192,7 +213,7 @@
<tr>
<td><code><a href="/https/github.com/docs/reference/kotlin/org/reactivestreams/Publisher.html">Publisher</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.html">LiveContentResponse</a>></code></td>
<td>
- <p>A <code><a href="/https/github.com/docs/reference/kotlin/org/reactivestreams/Publisher.html">Publisher</a></code> which will emit <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.html">LiveContentResponse</a></code> as and when it receives it.</p>
+ <p>A <code><a href="/https/github.com/docs/reference/kotlin/org/reactivestreams/Publisher.html">Publisher</a></code> which will emit <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.html">LiveContentResponse</a></code> from the model.</p>
</td>
</tr>
</tbody>
@@ -213,17 +234,37 @@
<tr>
<td><code>com.google.firebase.vertexai.type.SessionAlreadyReceivingException: <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/SessionAlreadyReceivingException.html">com.google.firebase.vertexai.type.SessionAlreadyReceivingException</a></code></td>
<td>
- <p>When the session is already receiving.</p>
+ <p>when the session is already receiving.</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%">See also</th>
+ </tr>
+ </thead>
+ <tbody class="list">
+ <tr>
+ <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopReceiving()">stopReceiving</a></code></td>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
</div>
<div class="api-item"><a name="send-com.google.firebase.vertexai.type.Content-"></a><a name="send"></a>
<h3 class="api-name" id="send(com.google.firebase.vertexai.type.Content)">send</h3>
<pre class="api-signature no-pretty-print">abstract fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#send(com.google.firebase.vertexai.type.Content)">send</a>(content: <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/Content.html">Content</a>): <a href="/https/github.com/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></pre>
- <p>Sends <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/Content.html">data</a></code> to the server.</p>
+ <p>Sends <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/Content.html">data</a></code> to the model.</p>
+ <p>Calling this after <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code> will play the response audio immediately.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -239,7 +280,7 @@
<tr>
<td><code>content: <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/Content.html">Content</a></code></td>
<td>
- <p>Client <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/Content.html">Content</a></code> to be sent to the server.</p>
+ <p>Client <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/Content.html">Content</a></code> to be sent to the model.</p>
</td>
</tr>
</tbody>
@@ -249,7 +290,8 @@
<div class="api-item"><a name="send-kotlin.String-"></a><a name="send"></a>
<h3 class="api-name" id="send(kotlin.String)">send</h3>
<pre class="api-signature no-pretty-print">abstract fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#send(kotlin.String)">send</a>(text: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>): <a href="/https/github.com/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></pre>
- <p>Sends text to the server</p>
+ <p>Sends text to the model.</p>
+ <p>Calling this after <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code> will play the response audio immediately.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -265,7 +307,7 @@
<tr>
<td><code>text: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a></code></td>
<td>
- <p>Text to be sent to the server.</p>
+ <p>Text to be sent to the model.</p>
</td>
</tr>
</tbody>
@@ -275,7 +317,7 @@
<div class="api-item"><a name="sendFunctionResponse-kotlin.collections.List-"></a><a name="sendfunctionresponse"></a>
<h3 class="api-name" id="sendFunctionResponse(kotlin.collections.List)">sendFunctionResponse</h3>
<pre class="api-signature no-pretty-print">abstract fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#sendFunctionResponse(kotlin.collections.List)">sendFunctionResponse</a>(functionList: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a>>): <a href="/https/github.com/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></pre>
- <p>Sends the function response from the client to the server.</p>
+ <p>Sends function calling responses to the model.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -301,7 +343,8 @@
<div class="api-item"><a name="sendMediaStream-kotlin.collections.List-"></a><a name="sendmediastream"></a>
<h3 class="api-name" id="sendMediaStream(kotlin.collections.List)">sendMediaStream</h3>
<pre class="api-signature no-pretty-print">abstract fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#sendMediaStream(kotlin.collections.List)">sendMediaStream</a>(mediaChunks: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/MediaData.html">MediaData</a>>): <a href="/https/github.com/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></pre>
- <p>Streams client data to the server.</p>
+ <p>Streams client data to the model.</p>
+ <p>Calling this after <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code> will play the response audio immediately.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -326,13 +369,13 @@
</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 fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation()">startAudioConversation</a>(): <a href="/https/github.com/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></pre>
- <p>Starts an audio conversation with the Gemini server, which can only be stopped using <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a></code>.</p>
+ <pre class="api-signature no-pretty-print">@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission.html">RequiresPermission</a>(value = "android.permission.RECORD_AUDIO")<br>abstract fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation()">startAudioConversation</a>(): <a href="/https/github.com/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></pre>
+ <p>Starts an audio conversation with the model, which can only be stopped using <code><a href="/https/github.com/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 fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a>(<br> functionCallHandler: ((<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallPart.html">FunctionCallPart</a>) <span style="white-space: nowrap;">-></span> <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a>)?<br>): <a href="/https/github.com/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></pre>
- <p>Starts an audio conversation with the Gemini server, which can only be stopped using <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a></code>.</p>
+ <p>Starts an audio conversation with the model, which can only be stopped using <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a></code> or <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#close()">close</a></code>.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -348,7 +391,7 @@
<tr>
<td><code>functionCallHandler: ((<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallPart.html">FunctionCallPart</a>) <span style="white-space: nowrap;">-></span> <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a>)?</code></td>
<td>
- <p>A callback function to map function calls from the server to their response parts.</p>
+ <p>A callback function that is invoked whenever the model receives a function call.</p>
</td>
</tr>
</tbody>
@@ -357,8 +400,17 @@
</div>
<div class="api-item"><a name="stopAudioConversation--"></a><a name="stopaudioconversation"></a>
<h3 class="api-name" id="stopAudioConversation()">stopAudioConversation</h3>
- <pre class="api-signature no-pretty-print">abstract fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a>(): <a href="/https/github.com/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></pre>
+ <pre class="api-signature no-pretty-print">@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission.html">RequiresPermission</a>(value = "android.permission.RECORD_AUDIO")<br>abstract fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopAudioConversation()">stopAudioConversation</a>(): <a href="/https/github.com/docs/reference/kotlin/com/google/common/util/concurrent/ListenableFuture.html">ListenableFuture</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>></pre>
<p>Stops the audio conversation with the Gemini Server.</p>
+ <p>This only needs to be called after a previous call to <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code>.</p>
+ <p>If there is no audio conversation currently active, this function does nothing.</p>
+ </div>
+ <div class="api-item"><a name="stopReceiving--"></a><a name="stopreceiving"></a>
+ <h3 class="api-name" id="stopReceiving()">stopReceiving</h3>
+ <pre class="api-signature no-pretty-print">abstract fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopReceiving()">stopReceiving</a>(): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
+ <p>Stops receiving from the model.</p>
+ <p>If this function is called during an ongoing audio conversation, the model's response will not be received, and no audio will be played; the live session object will no longer receive data from the server.</p>
+ <p>To resume receiving data, you must either handle it directly using <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#receive()">receive</a></code>, or indirectly by using <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code>.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -372,22 +424,13 @@
</thead>
<tbody class="list">
<tr>
- <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code></td>
- <td></td>
- </tr>
- <tr>
- <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopReceiving()">stopReceiving</a></code></td>
+ <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#close()">close</a></code></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
- <div class="api-item"><a name="stopReceiving--"></a><a name="stopreceiving"></a>
- <h3 class="api-name" id="stopReceiving()">stopReceiving</h3>
- <pre class="api-signature no-pretty-print">abstract fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.html#stopReceiving()">stopReceiving</a>(): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
- <p>Stop receiving from the server.</p>
- </div>
</div>
</body>
</html> --- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.html 2025-04-15 19:53:48.332185524 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.html 2025-04-15 19:51:39.404021061 +0000
@@ -11,7 +11,7 @@
<pre>@<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/PublicPreviewAPI.html">PublicPreviewAPI</a><br>class <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.html">LiveGenerationConfig</a></pre>
</p>
<hr>
- <p>Configuration parameters to use for content generation.</p>
+ <p>Configuration parameters to use for live content generation.</p>
<h2>Summary</h2>
<div class="devsite-table-wrapper">
<table class="responsive"> --- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/LiveSession.html 2025-04-15 19:53:48.328185424 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/LiveSession.html 2025-04-15 19:51:39.400020886 +0000
@@ -36,49 +36,49 @@
<td><code><a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html">Flow</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.html">LiveContentResponse</a>></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#receive()">receive</a>()</code></div>
- <p>Receives responses from the server for both streaming and standard requests.</p>
+ <p>Receives responses from the model for both streaming and standard requests.</p>
</td>
</tr>
<tr>
<td><code>suspend <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#send(com.google.firebase.vertexai.type.Content)">send</a>(content: <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/Content.html">Content</a>)</code></div>
- <p>Sends data to the server.</p>
+ <p>Sends <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/Content.html">data</a></code> to the model.</p>
</td>
</tr>
<tr>
<td><code>suspend <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#send(kotlin.String)">send</a>(text: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>)</code></div>
- <p>Sends text to the server.</p>
+ <p>Sends text to the model.</p>
</td>
</tr>
<tr>
<td><code>suspend <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#sendFunctionResponse(kotlin.collections.List)">sendFunctionResponse</a>(functionList: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a>>)</code></div>
- <p>Sends the function calling responses to the server.</p>
+ <p>Sends function calling responses to the model.</p>
</td>
</tr>
<tr>
<td><code>suspend <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#sendMediaStream(kotlin.collections.List)">sendMediaStream</a>(mediaChunks: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/MediaData.html">MediaData</a>>)</code></div>
- <p>Streams client data to the server.</p>
+ <p>Streams client data to the model.</p>
</td>
</tr>
<tr>
<td><code>suspend <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td>
- <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a>(<br> functionCallHandler: ((<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallPart.html">FunctionCallPart</a>) <span style="white-space: nowrap;">-></span> <a href="/https/github.com/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="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#stopAudioConversation()">stopAudioConversation</a></code>.</p>
+ <div><code>@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission.html">RequiresPermission</a>(value = "android.permission.RECORD_AUDIO")<br><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a>(<br> functionCallHandler: ((<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallPart.html">FunctionCallPart</a>) <span style="white-space: nowrap;">-></span> <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a>)?<br>)</code></div>
+ <p>Starts an audio conversation with the model, which can only be stopped using <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#stopAudioConversation()">stopAudioConversation</a></code> or <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#close()">close</a></code>.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td>
<td>
<div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#stopAudioConversation()">stopAudioConversation</a>()</code></div>
- <p>Stops the audio conversation with the Gemini Server.</p>
+ <p>Stops the audio conversation with the model.</p>
</td>
</tr>
<tr>
@@ -97,12 +97,32 @@
<h3 class="api-name" id="close()">close</h3>
<pre class="api-signature no-pretty-print">suspend fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#close()">close</a>(): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
<p>Closes the client session.</p>
- <p>After this is called, the session object becomes unusable. To interact with the server again, you must create a new session using <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/LiveGenerativeModel.html">LiveGenerativeModel</a></code>.</p>
+ <p>Once a <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html">LiveSession</a></code> is closed, it can not be reopened; you'll need to start a new <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html">LiveSession</a></code>.</p>
+ <div class="devsite-table-wrapper">
+ <table class="responsive">
+ <colgroup>
+ <col width="40%">
+ <col>
+ </colgroup>
+ <thead>
+ <tr>
+ <th colspan="100%">See also</th>
+ </tr>
+ </thead>
+ <tbody class="list">
+ <tr>
+ <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#stopReceiving()">stopReceiving</a></code></td>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
</div>
<div class="api-item"><a name="receive--"></a><a name="receive"></a>
<h3 class="api-name" id="receive()">receive</h3>
<pre class="api-signature no-pretty-print">fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#receive()">receive</a>(): <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html">Flow</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.html">LiveContentResponse</a>></pre>
- <p>Receives responses from the server for both streaming and standard requests. Call <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#stopReceiving()">stopReceiving</a></code> to stop receiving responses from the server.</p>
+ <p>Receives responses from the model for both streaming and standard requests.</p>
+ <p>Call <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#close()">close</a></code> to stop receiving responses from the model.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -118,7 +138,7 @@
<tr>
<td><code><a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html">Flow</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.html">LiveContentResponse</a>></code></td>
<td>
- <p>A <code><a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html">Flow</a></code> which will emit <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.html">LiveContentResponse</a></code> as and when it receives it</p>
+ <p>A <code><a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html">Flow</a></code> which will emit <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.html">LiveContentResponse</a></code> from the model.</p>
</td>
</tr>
</tbody>
@@ -145,11 +165,31 @@
</tbody>
</table>
</div>
+ <div class="devsite-table-wrapper">
+ <table class="responsive">
+ <colgroup>
+ <col width="40%">
+ <col>
+ </colgroup>
+ <thead>
+ <tr>
+ <th colspan="100%">See also</th>
+ </tr>
+ </thead>
+ <tbody class="list">
+ <tr>
+ <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#stopReceiving()">stopReceiving</a></code></td>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
</div>
<div class="api-item"><a name="send-com.google.firebase.vertexai.type.Content-"></a><a name="send"></a>
<h3 class="api-name" id="send(com.google.firebase.vertexai.type.Content)">send</h3>
<pre class="api-signature no-pretty-print">suspend fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#send(com.google.firebase.vertexai.type.Content)">send</a>(content: <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/Content.html">Content</a>): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
- <p>Sends data to the server. Calling this after <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code> will play the response audio immediately.</p>
+ <p>Sends <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/Content.html">data</a></code> to the model.</p>
+ <p>Calling this after <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code> will play the response audio immediately.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -165,7 +205,7 @@
<tr>
<td><code>content: <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/Content.html">Content</a></code></td>
<td>
- <p>Client <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/Content.html">Content</a></code> to be sent to the server.</p>
+ <p>Client <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/Content.html">Content</a></code> to be sent to the model.</p>
</td>
</tr>
</tbody>
@@ -175,7 +215,8 @@
<div class="api-item"><a name="send-kotlin.String-"></a><a name="send"></a>
<h3 class="api-name" id="send(kotlin.String)">send</h3>
<pre class="api-signature no-pretty-print">suspend fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#send(kotlin.String)">send</a>(text: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
- <p>Sends text to the server. Calling this after <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code> will play the response audio immediately.</p>
+ <p>Sends text to the model.</p>
+ <p>Calling this after <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code> will play the response audio immediately.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -191,7 +232,7 @@
<tr>
<td><code>text: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a></code></td>
<td>
- <p>Text to be sent to the server.</p>
+ <p>Text to be sent to the model.</p>
</td>
</tr>
</tbody>
@@ -201,7 +242,8 @@
<div class="api-item"><a name="sendFunctionResponse-kotlin.collections.List-"></a><a name="sendfunctionresponse"></a>
<h3 class="api-name" id="sendFunctionResponse(kotlin.collections.List)">sendFunctionResponse</h3>
<pre class="api-signature no-pretty-print">suspend fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#sendFunctionResponse(kotlin.collections.List)">sendFunctionResponse</a>(functionList: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a>>): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
- <p>Sends the function calling responses to the server.</p>
+ <p>Sends function calling responses to the model.</p>
+ <p><b>NOTE:</b> If you're using <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code>, the method will handle sending function responses to the model for you. You do <em>not</em> need to call this method in that case.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -227,7 +269,8 @@
<div class="api-item"><a name="sendMediaStream-kotlin.collections.List-"></a><a name="sendmediastream"></a>
<h3 class="api-name" id="sendMediaStream(kotlin.collections.List)">sendMediaStream</h3>
<pre class="api-signature no-pretty-print">suspend fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#sendMediaStream(kotlin.collections.List)">sendMediaStream</a>(mediaChunks: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/MediaData.html">MediaData</a>>): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
- <p>Streams client data to the server. Calling this after <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code> will play the response audio immediately.</p>
+ <p>Streams client data to the model.</p>
+ <p>Calling this after <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code> will play the response audio immediately.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -252,8 +295,8 @@
</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">suspend fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a>(<br> functionCallHandler: ((<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallPart.html">FunctionCallPart</a>) <span style="white-space: nowrap;">-></span> <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a>)? = null<br>): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
- <p>Starts an audio conversation with the Gemini server, which can only be stopped using <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#stopAudioConversation()">stopAudioConversation</a></code>.</p>
+ <pre class="api-signature no-pretty-print">@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission.html">RequiresPermission</a>(value = "android.permission.RECORD_AUDIO")<br>suspend fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a>(<br> functionCallHandler: ((<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallPart.html">FunctionCallPart</a>) <span style="white-space: nowrap;">-></span> <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a>)? = null<br>): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
+ <p>Starts an audio conversation with the model, which can only be stopped using <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#stopAudioConversation()">stopAudioConversation</a></code> or <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#close()">close</a></code>.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -269,7 +312,7 @@
<tr>
<td><code>functionCallHandler: ((<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionCallPart.html">FunctionCallPart</a>) <span style="white-space: nowrap;">-></span> <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a>)? = null</code></td>
<td>
- <p>A callback function that is invoked whenever the server receives a function call.</p>
+ <p>A callback function that is invoked whenever the model receives a function call. The <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/FunctionResponsePart.html">FunctionResponsePart</a></code> that the callback function returns will be automatically sent to the model.</p>
</td>
</tr>
</tbody>
@@ -279,7 +322,9 @@
<div class="api-item"><a name="stopAudioConversation--"></a><a name="stopaudioconversation"></a>
<h3 class="api-name" id="stopAudioConversation()">stopAudioConversation</h3>
<pre class="api-signature no-pretty-print">fun <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#stopAudioConversation()">stopAudioConversation</a>(): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre>
- <p>Stops the audio conversation with the Gemini Server. This needs to be called only after calling <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code></p>
+ <p>Stops the audio conversation with the model.</p>
+ <p>This only needs to be called after a previous call to <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code>.</p>
+ <p>If there is no audio conversation currently active, this function does nothing.</p>
</div>
<div class="api-item"><a name="stopReceiving--"></a><a name="stopreceiving"></a>
<h3 class="api-name" id="stopReceiving()">stopReceiving</h3>
@@ -287,6 +332,25 @@
<p>Stops receiving from the model.</p>
<p>If this function is called during an ongoing audio conversation, the model's response will not be received, and no audio will be played; the live session object will no longer receive data from the server.</p>
<p>To resume receiving data, you must either handle it directly using <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#receive()">receive</a></code>, or indirectly by using <code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#startAudioConversation(kotlin.Function1)">startAudioConversation</a></code>.</p>
+ <div class="devsite-table-wrapper">
+ <table class="responsive">
+ <colgroup>
+ <col width="40%">
+ <col>
+ </colgroup>
+ <thead>
+ <tr>
+ <th colspan="100%">See also</th>
+ </tr>
+ </thead>
+ <tbody class="list">
+ <tr>
+ <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveSession.html#close()">close</a></code></td>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
</div>
</div>
</body> --- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/package-summary.html 2025-04-15 19:53:48.331185499 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/vertexai/type/package-summary.html 2025-04-15 19:51:39.402020973 +0000
@@ -242,7 +242,7 @@
<tr>
<td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.html">LiveGenerationConfig</a></code></td>
<td>
- <p>Configuration parameters to use for content generation.</p>
+ <p>Configuration parameters to use for live content generation.</p>
</td>
</tr>
<tr> |
Coverage Report 1Affected ProductsNo changes between base commit (47e37b5) and merge commit (c52aaed).Test Logs |
VinayGuthal
reviewed
Apr 14, 2025
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveClientSetupMessage.kt
Show resolved
Hide resolved
VinayGuthal
reviewed
Apr 14, 2025
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveClientSetupMessage.kt
Show resolved
Hide resolved
rlazo
reviewed
Apr 15, 2025
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/common/util/kotlin.kt
Outdated
Show resolved
Hide resolved
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/common/util/kotlin.kt
Outdated
Show resolved
Hide resolved
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/AudioHelper.kt
Outdated
Show resolved
Hide resolved
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/AudioHelper.kt
Outdated
Show resolved
Hide resolved
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/AudioHelper.kt
Outdated
Show resolved
Hide resolved
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt
Show resolved
Hide resolved
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt
Show resolved
Hide resolved
VinayGuthal
reviewed
Apr 15, 2025
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/common/util/android.kt
Outdated
Show resolved
Hide resolved
VinayGuthal
reviewed
Apr 15, 2025
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/common/util/android.kt
Show resolved
Hide resolved
VinayGuthal
approved these changes
Apr 15, 2025
This reverts commit 644a50b.
rlazo
approved these changes
Apr 15, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Per b/410070347,
This refactors our bidi model to be more thread safe, and take better advantage of immutability and kotlin coroutines. This solves various edge case issues, as well as makes it easier to maintain.
This PR also fixes the following: