Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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 @@ -37,11 +37,11 @@ public abstract class LiveModelFutures internal constructor() {
* @throws [ServiceConnectionHandshakeFailedException] If the client was not able to establish a
* connection with the server.
*/
public abstract fun connect(): ListenableFuture<LiveSession>
public abstract fun connect(): ListenableFuture<LiveSessionFutures>

private class FuturesImpl(private val model: LiveGenerativeModel) : LiveModelFutures() {
override fun connect(): ListenableFuture<LiveSession> {
return SuspendToFutureAdapter.launchFuture { model.connect() }
override fun connect(): ListenableFuture<LiveSessionFutures> {
return SuspendToFutureAdapter.launchFuture { LiveSessionFutures.from(model.connect()) }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ public abstract class LiveSessionFutures internal constructor() {
* @param functionCallHandler A callback function to map function calls from the server to their
* response parts.
*/
@JvmOverloads
public abstract fun startAudioConversation(
functionCallHandler: ((FunctionCallPart) -> FunctionResponsePart)?
): ListenableFuture<Unit>


/**
* Stops the audio conversation with the Gemini Server.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ private constructor(
public fun setFrequencyPenalty(frequencyPenalty: Float?): Builder = apply {
this.frequencyPenalty = frequencyPenalty
}
public fun setResponseModalities(responseModalities: ResponseModality?): Builder = apply {
this.responseModality = responseModalities
public fun setResponseModality(responseModality: ResponseModality?): Builder = apply {
this.responseModality = responseModality
}
public fun setSpeechConfig(speechConfig: SpeechConfig?): Builder = apply {
this.speechConfig = speechConfig
Expand Down
Loading