Skip to content

Commit a0911a7

Browse files
davidmotsonDavid Motsonashvilirachelsaunders
authored
Firebase AI Documentation Fix (#7569)
includes requested fixes to the Firebase AI documentation including: * Removing all uses of "e. g." * Adding backticks to code in @deprecated tags * Better details on `sendTextRealtime` --------- Co-authored-by: David Motsonashvili <[email protected]> Co-authored-by: rachelsaunders <[email protected]>
1 parent 0870199 commit a0911a7

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

firebase-ai/src/main/kotlin/com/google/firebase/ai/java/LiveSessionFutures.kt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,12 @@ public abstract class LiveSessionFutures internal constructor() {
197197
public abstract fun sendVideoRealtime(video: InlineData): ListenableFuture<Unit>
198198

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

217220
/**

firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Candidate.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ internal constructor(
8484
*
8585
* The rating will be restricted to a particular [category].
8686
*
87-
* @property category The category of harm being assessed (e.g., Hate speech).
87+
* @property category The category of harm being assessed (for example, Hate speech).
8888
* @property probability The likelihood of the content causing harm.
8989
* @property probabilityScore A numerical score representing the probability of harm, between `0`
9090
* and `1`.

firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ContentModality.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public class ContentModality private constructor(public val ordinal: Int) {
7171
/** Audio. */
7272
@JvmField public val AUDIO: ContentModality = ContentModality(4)
7373

74-
/** Document, e.g. PDF. */
74+
/** Document (for example, PDF). */
7575
@JvmField public val DOCUMENT: ContentModality = ContentModality(5)
7676
}
7777
}

firebase-ai/src/main/kotlin/com/google/firebase/ai/type/LiveSession.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ internal constructor(
342342
*
343343
* @param video Encoded image data extracted from a frame of the video, used to update the model
344344
* on the client's conversation, with the corresponding IANA standard MIME type of the video frame
345-
* data (e.g., `image/png`, `image/jpeg`, etc.).
345+
* data (for example, `image/png`, `image/jpeg`, etc.).
346346
*/
347347
public suspend fun sendVideoRealtime(video: InlineData) {
348348
FirebaseAIException.catchAsync {

firebase-ai/src/main/kotlin/com/google/firebase/ai/type/MediaData.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import kotlinx.serialization.Serializable
2727
* [Firebase documentation](https://firebase.google.com/docs/vertex-ai/input-file-requirements).
2828
*/
2929
@PublicPreviewAPI
30-
@Deprecated("Use InlineData instead", ReplaceWith("InlineData"))
30+
@Deprecated("Use `InlineData` instead", ReplaceWith("InlineData"))
3131
public class MediaData(public val data: ByteArray, public val mimeType: String) {
3232
@Serializable
3333
internal class Internal(

firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ResponseModality.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import com.google.firebase.ai.common.util.FirstOrdinalSerializer
2020
import kotlinx.serialization.KSerializer
2121
import kotlinx.serialization.Serializable
2222

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

2626
@Serializable(Internal.Serializer::class)

0 commit comments

Comments
 (0)