OpenAI Prompt Generator
Overview
You can use this Snap to generate the user prompt as specified in the prompt template with the mustache template.

- This is a Format-type Snap.
Works in Ultra Tasks
Prerequisites
None.
Limitations and known issues
None.
Snap views
| Type | Description | Examples of upstream and downstream Snaps |
|---|---|---|
| Input | This Snap has at the most one document input view. The Snap requires a prompt template. | Mapper |
| Output | This Snap supports at the most one binary or document output view. The Snap provides the augmented user prompt which is the combination of the user prompt and relevant context in the prompt template. | Mapper |
| Learn more about Error handling. | ||
Snap settings
- Expression icon (
): Allows using JavaScript syntax to access SnapLogic Expressions to set field values dynamically (if enabled). If disabled, you can provide a static value. Learn more.
- SnapGPT (
): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
- Suggestion icon (
): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
- Upload
: Uploads files. Learn more.
| Field/Field set | Type | Description |
|---|---|---|
| Label | String |
Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline. Default value: OpenAI Prompt Generator Example: Generate customer support prompt |
| Prompt template | Dropdown list |
Select the template to build the final prompt. The available option is Context Q & A.
This Snap supports variable replacement through a mustache on the input document.
Note: To reset the Prompt template to the default settings, click the Edit prompt and then click Generate Template.
Default value: Context Q & A |
| Open Prompt Composer | Button |
Click to launch Prompt Composer. |
| Advanced prompt output | Checkbox |
Select this checkbox to output the entire prompt message array instead of the individual prompt message. Default status: Deselected |
| User role | Dropdown list/Expression |
Appears when you select the Advanced prompt output checkbox. Required. Choose the role to use for the prompt. Available
options include:
Default value: USER Example: ASSISTANT |
| User name | String/Expression |
Appears when you select the Advanced prompt output checkbox. Specify an optional name to use for the prompt. If you leave this field blank, the Snap processes the request without using any name. Default value: N/A Example: sl-user |
| Content | String/Expression |
Appears when you select Advanced prompt output checkbox and USER in the User role field. Specify the multimodal content to be used in the prompt. Default value: N/A Example: $content |
| Snap execution | Dropdown list |
Choose one of the three modes in
which the Snap executes. Available options are:
Default value: Validate & Execute Example: Execute only |