Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -197,9 +197,12 @@ public abstract class LiveSessionFutures internal constructor() {
public abstract fun sendVideoRealtime(video: InlineData): ListenableFuture<Unit>

/**
* Sends text data to the server in realtime. Check
* https://ai.google.dev/api/live#bidigeneratecontentrealtimeinput for details about the realtime
* input usage.
* For details about the realtime input usage, see the `BidiGenerateContentRealtimeInput`
* documentation (
* [Gemini Developer API](https://ai.google.dev/api/live#bidigeneratecontentrealtimeinput) or
* [Vertex AI Gemini API](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/model-reference/multimodal-live#bidigeneratecontentrealtimeinput)
* ).
*
* @param text The text data to send.
*/
public abstract fun sendTextRealtime(text: String): ListenableFuture<Unit>
Expand All @@ -211,7 +214,7 @@ public abstract class LiveSessionFutures internal constructor() {
*
* @param mediaChunks The list of [MediaData] instances representing the media data to be sent.
*/
@Deprecated("Use sendAudioRealtime, sendVideoRealtime, or sendTextRealtime instead")
@Deprecated("Use `sendAudioRealtime`, `sendVideoRealtime`, or `sendTextRealtime` instead")
public abstract fun sendMediaStream(mediaChunks: List<MediaData>): ListenableFuture<Unit>

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ internal constructor(
*
* The rating will be restricted to a particular [category].
*
* @property category The category of harm being assessed (e.g., Hate speech).
* @property category The category of harm being assessed (for example, Hate speech).
* @property probability The likelihood of the content causing harm.
* @property probabilityScore A numerical score representing the probability of harm, between `0`
* and `1`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class ContentModality private constructor(public val ordinal: Int) {
/** Audio. */
@JvmField public val AUDIO: ContentModality = ContentModality(4)

/** Document, e.g. PDF. */
/** Document, for example, PDF. */
@JvmField public val DOCUMENT: ContentModality = ContentModality(5)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ internal constructor(
*
* @param video Encoded image data extracted from a frame of the video, used to update the model
* on the client's conversation, with the corresponding IANA standard MIME type of the video frame
* data (e.g., `image/png`, `image/jpeg`, etc.).
* data (for example, `image/png`, `image/jpeg`, etc.).
*/
public suspend fun sendVideoRealtime(video: InlineData) {
FirebaseAIException.catchAsync {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import kotlinx.serialization.Serializable
* [Firebase documentation](https://firebase.google.com/docs/vertex-ai/input-file-requirements).
*/
@PublicPreviewAPI
@Deprecated("Use InlineData instead", ReplaceWith("InlineData"))
@Deprecated("Use `InlineData` instead", ReplaceWith("InlineData"))
public class MediaData(public val data: ByteArray, public val mimeType: String) {
@Serializable
internal class Internal(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import com.google.firebase.ai.common.util.FirstOrdinalSerializer
import kotlinx.serialization.KSerializer
import kotlinx.serialization.Serializable

/** Represents the type of content present in a response (e.g., text, image, audio). */
/** Represents the type of content present in a response (for example, text, image, audio). */
public class ResponseModality private constructor(public val ordinal: Int) {

@Serializable(Internal.Serializer::class)
Expand Down
Loading