diff --git a/src/main/java/com/google/genai/LiveConverters.java b/src/main/java/com/google/genai/LiveConverters.java index 8868c509d7f..3ad52414675 100644 --- a/src/main/java/com/google/genai/LiveConverters.java +++ b/src/main/java/com/google/genai/LiveConverters.java @@ -2924,6 +2924,13 @@ ObjectNode liveServerContentFromMldev(JsonNode fromObject, ObjectNode parentObje toObject)); } + if (Common.getValueByPath(fromObject, new String[] {"waitingForInput"}) != null) { + Common.setValueByPath( + toObject, + new String[] {"waitingForInput"}, + Common.getValueByPath(fromObject, new String[] {"waitingForInput"})); + } + return toObject; } @@ -3497,6 +3504,13 @@ ObjectNode liveServerContentFromVertex(JsonNode fromObject, ObjectNode parentObj toObject)); } + if (Common.getValueByPath(fromObject, new String[] {"waitingForInput"}) != null) { + Common.setValueByPath( + toObject, + new String[] {"waitingForInput"}, + Common.getValueByPath(fromObject, new String[] {"waitingForInput"})); + } + return toObject; } diff --git a/src/main/java/com/google/genai/types/LiveServerContent.java b/src/main/java/com/google/genai/types/LiveServerContent.java index b229214bf96..c3f384fb09f 100644 --- a/src/main/java/com/google/genai/types/LiveServerContent.java +++ b/src/main/java/com/google/genai/types/LiveServerContent.java @@ -87,6 +87,13 @@ public abstract class LiveServerContent extends JsonSerializable { @JsonProperty("urlContextMetadata") public abstract Optional urlContextMetadata(); + /** + * If true, indicates that the model is not generating content because it is waiting for more + * input from the user, e.g. because it expects the user to continue talking. + */ + @JsonProperty("waitingForInput") + public abstract Optional waitingForInput(); + /** Instantiates a builder for LiveServerContent. */ @ExcludeFromGeneratedCoverageReport public static Builder builder() { @@ -229,6 +236,15 @@ public Builder urlContextMetadata(UrlContextMetadata.Builder urlContextMetadataB return urlContextMetadata(urlContextMetadataBuilder.build()); } + /** + * Setter for waitingForInput. + * + *

waitingForInput: If true, indicates that the model is not generating content because it is + * waiting for more input from the user, e.g. because it expects the user to continue talking. + */ + @JsonProperty("waitingForInput") + public abstract Builder waitingForInput(boolean waitingForInput); + public abstract LiveServerContent build(); }