Search

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.

image

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.

image

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.

options:
  - name: assistant
    type: object
    label: Assistant
    description: Assistant options
    groupOptions:
      - name: assistantName
        type: string
        label: Assistant Name
        description: The name of the assistant
        required: true
        default: "My Assistant"
      - name: assistantDescription
        type: string
        label: Assistant Description
        description: The description of the assistant
        required: true
        default: "My Assistant Description"

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.

options:
  - name: assistant
    type: object
    label: Assistant
    description: Assistant options
    properties:
      collapsible: true
    groupOptions:
      - name: assistantName
        type: string
        label: Assistant Name
        description: The name of the assistant
        required: true
        default: "My Assistant"

Providing Possible Values

Every so often, you want to limit the user to a list of possible values, you can do this with:

dname: type_of_correction
type: string
description: The format of the data to publish
possibleValues:
- label: Incorrect Column
	value: incorrectColumn

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.

options:
  - name: script
    type: script
    label: Script
    description: A script to run
    required: true
    default: |
      return {
        "hello": "world"
      }

attributeStatus

The attributeStatus option type allows you to choose an attribute status.

options:
  - name: attributeStatus
    type: attributeStatus
    label: Attribute Status
    description: The attribute status to use
    required: true
    default: "PENDING"

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.

options:
  - name: documentStatus
    type: documentStatus
    label: Document Status
    description: The document status to use
    required: true
    default: "PENDING"

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.

options:
  - name: label
    type: label
    label: Label
    description: The label to use
    required: true
    default: "PENDING"

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.

options:
  - name: simpleExpression
    type: simpleExpression
    label: Expression
    description: The expression to use
    required: true
    default: "3+5"

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.

options:
  - name: document
    type: document
    label: Document
    description: The document to use
    required: true

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.

options:
  - name: pipelineModelOptions
    type: pipelineModelOptions
    label: Pipeline Model Options
    description: The pipeline model options to use
    required: true
    default: "PENDING"

pipeline

The pipeline option type allows you to manage a pipeline object (made up of steps).

options:
  - name: pipeline
    type: pipeline
    label: Pipeline
    description: The pipeline to use
    required: true

tableStore

The tableStore option type allows you to select a data store.

options:
  - name: tableStore
    type: tableStore
    label: Table Store
    description: The data store to use
    required: true

modelStore

The modelStore option type allows you to choose a model store.

options:
  - name: modelStore
    type: modelStore
    label: Model Store
    description: The model store to use
    required: true

← Previous

Data Types

Next →

Filtering