Interface IPromptQueryIoDescriptor

All Known Subinterfaces:
IPromptQueryInputDescriptor, IPromptQueryOutputDescriptor

public interface IPromptQueryIoDescriptor
Base interface for input and output descriptors that define the structure of the data passed to a prompt query upon execution and the data returned from a prompt query upon execution. Each prompt query can accept and return a JSON value and a map of binary files. The input and output descriptors describe (a) the structure of that JSON value via jsonDescriptor(); and (b) which file types are available for which map key via fileDescriptor().
Since:
8.5.0
  • Method Summary

    Modifier and Type
    Method
    Description
    The descriptor that defines the structure of the files passed to or returned from the prompt query.
    The descriptor that defines the structure of the JSON value passed to or returned from the prompt query.
  • Method Details

    • jsonDescriptor

      IValueDescriptor<?,?> jsonDescriptor()
      The descriptor that defines the structure of the JSON value passed to or returned from the prompt query. The JSON value can be of any kind (null, boolean, number, string, array, object), but we recommend using a JSON object. If you ever need to add additional properties in the future, they can easily be added without breaking existing configurations. Use a null descriptor if no JSON input or output is available. Defaults to null when not specified.

      When creating the value descriptor, you can also add custom attributes, e.g. to define the display label for the UI. See StandardValueDescriptorAttributes for commonly used attributes.

      Returns:
      The JSON input value descriptor.
    • fileDescriptor

      IFileValueDescriptor fileDescriptor()
      The descriptor that defines the structure of the files passed to or returned from the prompt query. The files are a Map<String, List<File>>, the descriptor restricts the map keys and the allowed file types per key. If you only have a single list of files, consider using the default file key. Use an empty descriptor if no file input is needed. Defaults to empty when not specified.

      When creating the value descriptor, you can also add custom attributes, e.g. to define the display label for the UI. See StandardValueDescriptorAttributes for commonly used attributes.

      Returns:
      The file input value descriptor.