Skip to content

Commit 2ee57f4

Browse files
author
David Motsonashvili
committed
fixes for comments
1 parent 52800ad commit 2ee57f4

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

firebase-ai/api.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ package com.google.firebase.ai.type {
876876
}
877877

878878
@com.google.firebase.ai.type.PublicPreviewAPI public final class LiveServerContent implements com.google.firebase.ai.type.LiveServerMessage {
879-
ctor public LiveServerContent(com.google.firebase.ai.type.Content? content, boolean interrupted, boolean turnComplete, boolean generationComplete, com.google.firebase.ai.type.Transcription? inputTranscription, com.google.firebase.ai.type.Transcription? outputTranscription);
879+
ctor @Deprecated public LiveServerContent(com.google.firebase.ai.type.Content? content, boolean interrupted, boolean turnComplete, boolean generationComplete, com.google.firebase.ai.type.Transcription? inputTranscription, com.google.firebase.ai.type.Transcription? outputTranscription);
880880
method public com.google.firebase.ai.type.Content? getContent();
881881
method public boolean getGenerationComplete();
882882
method public com.google.firebase.ai.type.Transcription? getInputTranscription();
@@ -1252,7 +1252,6 @@ package com.google.firebase.ai.type {
12521252
}
12531253

12541254
public final class Transcription {
1255-
ctor public Transcription(String? text);
12561255
method public String? getText();
12571256
property public final String? text;
12581257
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ import kotlinx.serialization.json.jsonObject
4242
* play it out in realtime.
4343
*/
4444
@PublicPreviewAPI
45-
public class LiveServerContent(
45+
public class LiveServerContent
46+
@Deprecated("This class should not be constructed, only received from the Server")
47+
public constructor(
4648
/**
4749
* The content that the model has generated as part of the current conversation with the user.
4850
*

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ internal constructor(
136136
*
137137
* @param transcriptHandler A callback function that is invoked whenever the model receives a
138138
* transcript. The first [Transcription] object is the input transcription, and the second is the
139-
* output transcription
139+
* output transcription.
140140
*
141141
* @param enableInterruptions If enabled, allows the user to speak over or interrupt the model's
142142
* ongoing reply.
@@ -450,7 +450,7 @@ internal constructor(
450450
)
451451
}
452452
is LiveServerContent -> {
453-
if (it.outputTranscription != null || it.inputTranscription != null) {
453+
if (it.inputTranscription != null || it.outputTranscription != null) {
454454
transcriptHandler?.invoke(it.inputTranscription, it.outputTranscription)
455455
}
456456
if (it.interrupted) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import kotlinx.serialization.Serializable
2222
* Audio transcription message.
2323
* @property text Transcription text
2424
*/
25-
public class Transcription(public val text: String?) {
25+
public class Transcription internal constructor(public val text: String?) {
2626

2727
@Serializable
2828
internal data class Internal(val text: String?) {

0 commit comments

Comments
 (0)