java.lang.Object
com.google.genai.gaos.models.interactions.Function
All Implemented Interfaces:
AgentTool, Tool

public class Function extends Object implements AgentTool, Tool
Function

A tool that can be used by the model.

  • Constructor Details

    • Function

      public Function(@Nullable String description, @Nullable String name, @Nullable Object parameters)
    • Function

      public Function()
  • Method Details

    • description

      public Optional<String> description()
      A description of the function.
    • name

      public Optional<String> name()
      The name of the function.
    • parameters

      public Optional<Object> parameters()
      The JSON Schema for the function's parameters.
    • type

      public String type()
      Specified by:
      type in interface AgentTool
      Specified by:
      type in interface Tool
    • builder

      public static Function.Builder builder()
    • withDescription

      public Function withDescription(@Nullable String description)
      A description of the function.
    • withName

      public Function withName(@Nullable String name)
      The name of the function.
    • withParameters

      public Function withParameters(@Nullable Object parameters)
      The JSON Schema for the function's parameters.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object