Working with Options
Working with Options
There are several places where we have the ability to define options in our metadata. Options are there to allow you to define configuration for a component, parameters you available for things like actions or assistants. It also covers how we can expose additional settings for labels (options on a Taxon) or for a model to train or infer.
How does a user experience options?
There are several areas of the user experience where options are used. For example, if they have an assistant in their project then they will be able to configure the assistant.
In this case, the assistant has several options that can be configured. Furthermore, if they are labeling in a document then they can also see options available as “Properties” on the labels in the document.
Options are a powerful way to get the user to configure the system to their needs, while keeping them working in the user experience, and also focused on the content.
Option Types
Below is a list of the available option types.
Type | Description |
---|---|
script, pythonScript, javascript | Allows you to enter a script |
attributeStatus | Choose an attribute status |
documentStatus | Choose a document status |
label | Choose a document label |
simpleExpression | A simple expression |
document | Select a document |
pipelineModelOptions | Allow the configuration of options for one or more models in the pipeline |
pipeline | Manage a pipeline object (made up of steps |
tableStore | Choose a data store |
modelStore | Choose a model store |
documentStore | Choose a document store |
taxonomyStore | Choose a taxonomy (Data Stucture) |
taxon_label | Select a taxon in a taxonomy |
taxon_label_with_properties | Select a taxon and then allow the configuration of options related to the taxon |
string | A string |
boolean | A boolean |
number | A number |
alert | An information alert |
article | A call out to Intercom for an article |
Option Groups
Options can be grouped together to make them easier to understand. For example, if you have several options that are related to a specific feature, then you can group them together.
This allows you to build a hierarchy of options, which can be useful if you have many options. Furthermore, you use the properties of the group option to make it collapsible, then you can make the options easier to understand.
Providing Possible Values
Every so often, you want to limit the user to a list of possible values, you can do this with:
Option Type Reference
Below is a reference for each of the option types:
script
The script option type allows you to enter a script or code.
attributeStatus
The attributeStatus option type allows you to choose an attribute status.
documentStatus
The documentStatus option type allows you to select a document status. This will show you a dropdown of the available document statuses for the project in which the component is being used.
label
The label option type allows you to choose a document label. This just allows the user to type in the value for a label.
simpleExpression
The simpleExpression option type allows you to enter a simple expression. A simple expression is a string that can be evaluated to a value. For example, you could enter 3+5
and it would evaluate to 8
. It is presented as a single line text box.
document
The document option type allows you to choose a document. This will show you a dropdown of available document stores, and then allow you to search and find a document in the store you selected.
pipelineModelOptions
The pipelineModelOptions option type allows you to configure options for one or more models in the pipeline. This is a specialized option used to allow the setting of options from an assistant which already has the pipeline option configured.
pipeline
The pipeline option type allows you to manage a pipeline object (made up of steps).
tableStore
The tableStore option type allows you to select a data store.
modelStore
The modelStore option type allows you to choose a model store.