Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The params section on each intent lists the parameters required to call the command. For the mail.send command these are for example the parameters to, from, subject and message. The The values of these parameters can be fixed, templated or can be detected by the AI.

All parameter attributes are explained below.

...

Defines whether this parameter is required. In case it is required and its value is finally missing or cannot be detected by AI, an error is thrown and further execution stops.

The default value is false.

...

The data type of the parameter such as string, boolean, integer, number.

If different from string and parameter is detected by AI, the AI also tries to convert to this format.

The default value is string.

...

This can be a fixed value (literal) or a template. By default the Mustache template syntax can be used which starts with {{ and ends with }}. The variables advice and intent are passed as model context to the template. This way you can access for example settings and values of other parameters after they have been resolved by the AI in order to formulate the final parameter for a command.

See this example to construct a message out of advice parameters using a template:

Code Block
languageyaml
...
targetCommand: "mail.send"
...
params:
  message:
    value: "The customerId is: {{advice.params.customerId}}"
  ...

Here is a more advanced example to pass auto-detected parameters into the command worklow.start as workflow variables using the parameter variables:

Code Block
languageyaml
...
targetCommand: "workflow.start"
...
params:
  variables:
    value:
      customerId: "{{advice.params.customerId}}"
      customerName: "{{advice.params.customerName}}"
  ...

instruction (optional)

For each parameter, an attribute instruction instead of a value can be set. Not both!

In this case the AI will auto-detect the parameter value by reading and applying this instruction on the input and setting the result on the value field automatically.

See this example where the subject parameter for the mail.send command will be auto-detected by AI:

Code Block
languageyaml
...
targetCommand: "mail.send"
...
params:
  subject:
    instruction: "Use the subject from initial sender email"
  ...