Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
14 changes: 14 additions & 0 deletions src/main/java/com/google/genai/LiveConverters.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down
16 changes: 16 additions & 0 deletions src/main/java/com/google/genai/types/LiveServerContent.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ public abstract class LiveServerContent extends JsonSerializable {
@JsonProperty("urlContextMetadata")
public abstract Optional<UrlContextMetadata> 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<Boolean> waitingForInput();

/** Instantiates a builder for LiveServerContent. */
@ExcludeFromGeneratedCoverageReport
public static Builder builder() {
Expand Down Expand Up @@ -229,6 +236,15 @@ public Builder urlContextMetadata(UrlContextMetadata.Builder urlContextMetadataB
return urlContextMetadata(urlContextMetadataBuilder.build());
}

/**
* Setter for waitingForInput.
*
* <p>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();
}

Expand Down