Skip to content

Variables โ€‹

Variables allow you to define terms that can be reused in multiple places in your prompts and updated simultaneously in one place.

Examples of good use cases for variables are titles, names, locations, identifiers, etc.

For now, variables can only be used inside Text Blocks, not Data Blocks.

Variables preview

Local variables โ€‹

Local variables are limited in scope to the current prompt only.

You can add local variables to message blocks by just typing {{, followed by the variable name (it will autocomplete), and then either space or enter. You can only use alphanumeric characters and underscores in variable names, no spaces.

Note that the variable "name" is not the value the will be substituted into the prompt.

Global variables โ€‹

Global variables can be defined in the project settings and share common values across all prompts in the project.

You can use global variables just like local variables. Promptmetheus will always check if a global variable exists for a given name and if not, it will create a local one.

For more information on global variables, take a look at the Projects section.