From 21037c28dd2b4efb36914c70bbe2df7773dc79dc Mon Sep 17 00:00:00 2001 From: Emily Ploszaj Date: Thu, 20 Aug 2026 12:49:24 -0500 Subject: [PATCH] Add missing turnComplete field for LiveSessionFutures --- .../google/firebase/ai/java/LiveSessionFutures.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ai-logic/firebase-ai/src/main/kotlin/com/google/firebase/ai/java/LiveSessionFutures.kt b/ai-logic/firebase-ai/src/main/kotlin/com/google/firebase/ai/java/LiveSessionFutures.kt index eb85bed2f9f..adeb6f1d9b5 100644 --- a/ai-logic/firebase-ai/src/main/kotlin/com/google/firebase/ai/java/LiveSessionFutures.kt +++ b/ai-logic/firebase-ai/src/main/kotlin/com/google/firebase/ai/java/LiveSessionFutures.kt @@ -251,6 +251,16 @@ public abstract class LiveSessionFutures internal constructor() { */ public abstract fun send(content: Content): ListenableFuture + /** + * Sends [data][Content] to the model. + * + * Calling this after [startAudioConversation] will play the response audio immediately. + * + * @param content Client [Content] to be sent to the model. + * @param turnComplete Whether the user's input turn has finished. + */ + public abstract fun send(content: Content, turnComplete: Boolean): ListenableFuture + /** * Sends text to the model. * @@ -294,6 +304,9 @@ public abstract class LiveSessionFutures internal constructor() { override fun send(content: Content) = SuspendToFutureAdapter.launchFuture { session.send(content) } + override fun send(content: Content, turnComplete: Boolean) = + SuspendToFutureAdapter.launchFuture { session.send(content, turnComplete) } + override fun sendFunctionResponse(functionList: List) = SuspendToFutureAdapter.launchFuture { session.sendFunctionResponse(functionList) }