Skip to content

Commit 589328e

Browse files
google-genai-botcopybara-github
authored andcommitted
feat: Support ChatCompletionChunk to LlmResponse conversion
This is part of a larger chain of commits for adding chat completion API support to the Apigee model. PiperOrigin-RevId: 901419365
1 parent 5be29d4 commit 589328e

3 files changed

Lines changed: 600 additions & 60 deletions

File tree

core/src/main/java/com/google/adk/models/chat/ChatCompletionsCommon.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public FunctionCall toFunctionCall(@Nullable String toolCallId) {
136136
if (name != null) {
137137
fcBuilder.name(name);
138138
}
139-
if (arguments != null) {
139+
if (arguments != null && !arguments.isEmpty()) {
140140
try {
141141
Map<String, Object> args =
142142
objectMapper.readValue(arguments, new TypeReference<Map<String, Object>>() {});

0 commit comments

Comments
 (0)