Enum ToolCallStatus

java.lang.Object
java.lang.Enum<ToolCallStatus>
uno.anahata.ai.tools.ToolCallStatus
All Implemented Interfaces:
Serializable, Comparable<ToolCallStatus>, java.lang.constant.Constable

public enum ToolCallStatus extends Enum<ToolCallStatus>
Represents the definitive final status of a tool call after user interaction and execution attempts.

This provides a more granular and explicit status than the simple FunctionConfirmation, capturing states like cancellation or feature disablement.

Author:
anahata
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    The user's preference for this tool is 'Always', and it was executed.
    The user cancelled the entire confirmation dialog, so no calls in the batch were executed.
    The model attempted to call a tool while function calling was disabled by the user.
    The user's preference for this tool is 'Never', and it was not executed.
    The user explicitly denied this tool call for this turn.
    The user explicitly approved this tool call for this turn, and it was executed.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • ALWAYS

      public static final ToolCallStatus ALWAYS
      The user's preference for this tool is 'Always', and it was executed.
    • YES

      public static final ToolCallStatus YES
      The user explicitly approved this tool call for this turn, and it was executed.
    • NO

      public static final ToolCallStatus NO
      The user explicitly denied this tool call for this turn.
    • NEVER

      public static final ToolCallStatus NEVER
      The user's preference for this tool is 'Never', and it was not executed.
    • CANCELLED

      public static final ToolCallStatus CANCELLED
      The user cancelled the entire confirmation dialog, so no calls in the batch were executed.
    • DISABLED

      public static final ToolCallStatus DISABLED
      The model attempted to call a tool while function calling was disabled by the user.
  • Method Details

    • values

      public static ToolCallStatus[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ToolCallStatus valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null