Variables
Learn how to create variable and set their values.
Variables are the dynamic content in your prompt, taking different values for all your scenarios. Think of them as fill in the blanks in a template.
A variable can be added anywhere in a prompt by simply enclosing a variable name with double curly braces, for example {{user_question}}
. The content for variables is set in the Variable Editor.
Variables support text and image content.
Creating Text Variables
Text variables are simple to create.
Double curly braces
Anywhere in your prompt editor or playground, enclose a variable name of your choice with opening and closing double curly braces. For eg. {{user_question}}
.
Fill variable value
- Navigate to the variable editor and click on the newly created variable
- Insert a variable value to test your prompt with
Creating Image Variables
Let’s create image variable.
Click insert image
-
Click on insert image button on the message you want to add the image variable to
-
From the dropdown, choose
From Variable
- Add your desired variable name
Fill variable value
- Navigate to the variable editor and double click on the newly created variable
- Drag and drop the image, insert an image URL or Base64 value to test your prompt with