Block
A Snippet is made up of one or more Blocks which are connected in sequence, with each block taking inputs from the previous block and producing outputs for the next one.
As the screenshots below show:
A block is made up of four distinct parts: Input, Output, Variable Declaration, and Specific Block Configuration. Some blocks may not have all of these parts.
Input
Input declares the necessary information that the block requires to perform its specific function.
Input are made up of Parameters, and Parameters are made up of Primitive Types.
Output
This section defines what the block will output after processing the input.
Output are made up of Parameters, and Parameters are made up of Primitive Types.
Variable Declaration
Here, variables used within the block are declared and defined. All variable declared is available to next following blocks.
Variable Declarations are made up of Parameters, and Parameters are made up of Primitive Types.
Configuration about Specific Block
This section includes any unique configuration that is specific to this particular block. For example, the AI Model Application Block has the following configuration:
- URL
- Model Type
- Result Confirmer
- Confidence Threshold
Parameters and Primitive Types
A Parameter consists of one Primitive Type or a collection of Primitive Types. Currently there are 5 Primitive Types:
- any: any type of data
- array: an array of any primitive type
- string: a string of characters
- number: a number
- data: consist of bytes
- image: an image
- visionObservation: a vision observation
- textObservation: a text observation
Specific blocks may not have all of these Primitive Types available. For example, the Photo Libray Block can only accept image as output.