Skip to content

Commit 48c906c

Browse files
google-genai-botcopybara-github
authored andcommitted
feat: update stateDelta to accept general Map type
PiperOrigin-RevId: 884400702
1 parent b6356d2 commit 48c906c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

core/src/main/java/com/google/adk/events/EventActions.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,12 @@ public Builder skipSummarization(boolean skipSummarization) {
287287

288288
@CanIgnoreReturnValue
289289
@JsonProperty("stateDelta")
290-
public Builder stateDelta(ConcurrentMap<String, Object> value) {
291-
this.stateDelta = value;
290+
public Builder stateDelta(Map<String, Object> value) {
291+
if (value instanceof ConcurrentMap) {
292+
this.stateDelta = (ConcurrentMap<String, Object>) value;
293+
} else {
294+
this.stateDelta = new ConcurrentHashMap<>(value);
295+
}
292296
return this;
293297
}
294298

0 commit comments

Comments
 (0)