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 TypeMethodDescriptionThe descriptor that defines the structure of the files passed to or returned from the prompt query.IValueDescriptor<?, ?> 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 anulldescriptor if no JSON input or output is available. Defaults tonullwhen not specified.When creating the value descriptor, you can also
add custom attributes, e.g. to define the display label for the UI. SeeStandardValueDescriptorAttributesfor 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 aMap<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 thedefault file key. Use anemptydescriptor if no file input is needed. Defaults toemptywhen not specified.When creating the value descriptor, you can also
add custom attributes, e.g. to define the display label for the UI. SeeStandardValueDescriptorAttributesfor commonly used attributes.- Returns:
- The file input value descriptor.
-