Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,16 @@ public abstract class LiveSessionFutures internal constructor() {
*/
public abstract fun send(content: Content): ListenableFuture<Unit>

/**
* 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<Unit>

/**
* Sends text to the model.
*
Expand Down Expand Up @@ -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<FunctionResponsePart>) =
SuspendToFutureAdapter.launchFuture { session.sendFunctionResponse(functionList) }

Expand Down
Loading