Class Functions

java.lang.Object
com.google.adk.flows.llmflows.Functions

public final class Functions extends Object
Utility class for handling function calls.
  • Method Details

    • generateClientFunctionCallId

      public static String generateClientFunctionCallId()
      Generates a unique ID for a function call.
    • populateClientFunctionCallId

      public static void populateClientFunctionCallId(Event modelResponseEvent)
      Populates missing function call IDs in the provided event's content.

      If the event contains function calls without an ID, this method generates a unique client-side ID for each and updates the event content.

      Parameters:
      modelResponseEvent - The event potentially containing function calls.
    • handleFunctionCalls

      public static io.reactivex.rxjava3.core.Maybe<Event> handleFunctionCalls(InvocationContext invocationContext, Event functionCallEvent, Map<String,BaseTool> tools)
    • getLongRunningFunctionCalls

      public static Set<String> getLongRunningFunctionCalls(List<com.google.genai.types.FunctionCall> functionCalls, Map<String,BaseTool> tools)