What is a Variable?

Tela allows you to include Variables within your Prompt.

Variables indicate a place in your prompt that can have it’s content changed dynamically. You can vary it’s content as you need without having to modify your Canvas directly.

Variables are useful when you want to:

  • Have a place to dynamically provide content to your Canvas, depending on your need at runtime
  • Test different possible scenarios without having to edit the core of the Prompt itself, just changing the Variables
  • Use a Canvas with a specific context to understand and process the content of a variable and return some result

Creating a variable

You can create a Variable from anywhere in the Prompt Editor by simply typing the Variable name within curly brackets, such as {variableName}.

Please keep your variable names simple, we recommend using only letters, numbers and underscores (_).

There’s no limitation to how many variables you can create, but some of our features work best with a single variable per canvas.

As soon as you create a Variable, you will see a place to input a value for the Variable on the Preview pane, on the right side of the page.

Providing the content of a variable

In the preview pane, you will see a field for each one of your variables. This is where you can provide the content of your variables and edit it for different runs without having to edit your Canvas directly.

You can provide the content of a variable in the following ways:

  • Writing some text on the field.
  • Dragging a file from your computer into the variable field.
  • Pressing / to open our commands and selecting the “Add file” option.
For information on supported file formats, visit Supported files.
Check out Integrating via API for further details on how to use variables with our API