Skip to content

Commit c6c9557

Browse files
google-genai-botcopybara-github
authored andcommitted
fix: Always use a mutable HashMap for default function arguments
PiperOrigin-RevId: 855577452
1 parent 5103c09 commit c6c9557

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core/src/main/java/com/google/adk/flows/llmflows/Functions.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,7 @@ private static Function<FunctionCall, Maybe<Event>> getFunctionCallMapper(
263263
invocationContext));
264264
}
265265

266-
Map<String, Object> functionArgs =
267-
functionCall.args().orElse(isLive ? new HashMap<>() : ImmutableMap.of());
266+
Map<String, Object> functionArgs = functionCall.args().orElse(new HashMap<>());
268267

269268
Maybe<Map<String, Object>> maybeFunctionResult =
270269
maybeInvokeBeforeToolCall(invocationContext, tool, functionArgs, toolContext)

0 commit comments

Comments
 (0)