Skip to content

Commit b6c7b2e

Browse files
committed
Merge branch 'function_ids' of github.com:zbirkenbuel/adk-java into function_ids
2 parents 9e52f62 + 6023a50 commit b6c7b2e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

a2a/src/main/java/com/google/adk/a2a/converters/PartConverter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private static Optional<com.google.genai.types.Part> convertDataPartToGenAiPart(
137137
return Optional.of(
138138
com.google.genai.types.Part.builder()
139139
.functionCall(
140-
FunctionCall.builder().name(functionName).id(functionId).args(args).build())
140+
FunctionCall.builder().name(functionName).id(functionId).id(functionId).args(args).build())
141141
.build());
142142
}
143143

@@ -150,7 +150,7 @@ private static Optional<com.google.genai.types.Part> convertDataPartToGenAiPart(
150150
com.google.genai.types.Part.builder()
151151
.functionResponse(
152152
FunctionResponse.builder()
153-
.name(functionName)
153+
.name(functionName).id(functionId)
154154
.id(functionId)
155155
.response(response)
156156
.build())

a2a/src/test/java/com/google/adk/a2a/EventConverterTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public void convertEventsToA2AMessage_preservesFunctionCallAndResponseParts() {
4545
Part.builder()
4646
.functionCall(
4747
FunctionCall.builder()
48-
.name("roll_die")
48+
.name("roll_die").id("adk-call-1")
4949
.id("adk-call-1")
5050
.args(Map.of("sides", 6))
5151
.build())
@@ -65,7 +65,7 @@ public void convertEventsToA2AMessage_preservesFunctionCallAndResponseParts() {
6565
Part.builder()
6666
.functionResponse(
6767
FunctionResponse.builder()
68-
.name("roll_die")
68+
.name("roll_die").id("adk-call-1")
6969
.id("adk-call-1")
7070
.response(Map.of("result", 3))
7171
.build())

0 commit comments

Comments
 (0)