Class Tools.Utils

java.lang.Object
com.inductiveautomation.ignition.common.ai.Tools.Utils
Enclosing class:
Tools

public static class Tools.Utils extends Object
  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • applyJsonSchema

      public static Tools.Utils.SchemaResult applyJsonSchema(Class<?> raw, Type type, String name, @Nullable ToolParam annotation)
      Builds the JSON schema fragment for parameter's type. Supports scalars ( String, the boxed and unboxed forms of int/long/double/ float/boolean), enum types (emitted as a string with an enum constraint of the constant names), and List<String>. Anything else throws.
    • listElementType

      public static @Nullable Type listElementType(Type generic)
      Resolves the element type of a generic List<T> parameter, or null when the parameter is a raw List with no compile-time element type.
    • coerce

      public static @Nullable Object coerce(@Nullable Object value, Class<?> targetType, Type type, String paramName)