Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -68,6 +68,7 @@ public abstract class LiveSessionFutures internal constructor() {
@RequiresPermission(RECORD_AUDIO)
public abstract fun stopAudioConversation(): ListenableFuture<Unit>


/**
* Stops receiving from the model.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ public class AudioRecordInitializationFailedException(message: String) :
public class ServiceConnectionHandshakeFailedException(message: String, cause: Throwable? = null) :
FirebaseAIException(message, cause)

/** The request is missing a permission that is required to perform the requested operation. */
public class PermissionMissingException(message: String, cause: Throwable? = null) :
FirebaseAIException(message, cause)

/** Catch all case for exceptions not explicitly expected. */
public class UnknownException internal constructor(message: String, cause: Throwable? = null) :
FirebaseAIException(message, cause)
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,17 @@ internal constructor(
}
}


/**
* Indicates whether the underlying websocket connection is active.
*/
public fun isActive(): Boolean = session.isActive

/**
* Indicates whether an audio conversation is being used for this session object.
*/
public fun isAudioConversationRunning(): Boolean = (audioHelper == null)

/**
* Receives responses from the model for both streaming and standard requests.
*
Expand Down
Loading