File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
core/src/main/java/com/google/adk/tools Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 2323import com .fasterxml .jackson .databind .ObjectMapper ;
2424import com .fasterxml .jackson .databind .introspect .AnnotatedMember ;
2525import com .fasterxml .jackson .databind .introspect .BeanPropertyDefinition ;
26- import com .fasterxml .jackson .datatype .jdk8 .Jdk8Module ;
2726import com .google .adk .JsonBaseModel ;
2827import com .google .common .base .Strings ;
2928import com .google .genai .types .FunctionDeclaration ;
4544/** Utility class for function calling. */
4645public final class FunctionCallingUtils {
4746
48- private static final ObjectMapper OBJECT_MAPPER =
49- new ObjectMapper ().registerModule (new Jdk8Module ());
5047 private static final Logger logger = LoggerFactory .getLogger (FunctionCallingUtils .class );
48+ private static final ObjectMapper OBJECT_MAPPER = JsonBaseModel .getMapper ();
5149
5250 /** Holds the state during a single schema generation process to handle caching and recursion. */
5351 private static class SchemaGenerationContext {
Original file line number Diff line number Diff line change 1818
1919import com .fasterxml .jackson .core .type .TypeReference ;
2020import com .fasterxml .jackson .databind .ObjectMapper ;
21- import com .fasterxml . jackson . datatype . jdk8 . Jdk8Module ;
21+ import com .google . adk . JsonBaseModel ;
2222import com .google .adk .agents .InvocationContext ;
2323import com .google .common .collect .ImmutableList ;
2424import com .google .common .collect .ImmutableMap ;
4242
4343/** FunctionTool implements a customized function calling tool. */
4444public class FunctionTool extends BaseTool {
45- private static final ObjectMapper OBJECT_MAPPER =
46- new ObjectMapper ().registerModule (new Jdk8Module ());
45+
4746 private static final Logger logger = LoggerFactory .getLogger (FunctionTool .class );
47+ private static final ObjectMapper OBJECT_MAPPER = JsonBaseModel .getMapper ();
4848
4949 @ Nullable private final Object instance ;
5050 private final Method func ;
You can’t perform that action at this time.
0 commit comments