EasyUse/Promptgenerated
PromptLine(promptLine)
The PromptLine node extracts a consecutive block of lines from a prompt string.
prompt Line
STRING
COMBO
prompt
text
start_index
0
max_rows
1000
remove_empty_lines
Easy Use
The PromptLine node extracts a consecutive block of lines from a prompt string. It lets you select a starting line, limit how many lines are returned, and optionally drop blank lines before doing the selection. The selected lines are returned both as a single joined STRING and as a COMBO/list value.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
prompt | STRING | text | The source prompt text. Line selection is performed on this string by splitting it on newline characters. |
start_index | INT | 0 | Zero-based index of the first line to select. 0 selects the first line. Range: 0–9999. |
max_rows | INT | 1000 | Maximum number of lines to return. If fewer lines are available after start_index, all remaining lines are returned. Range: 1–9999. |
remove_empty_lines | BOOLEAN | true | When enabled, empty or whitespace-only lines are removed before indexing and are not included in the output. When disabled, blank lines are preserved and count toward start_index/max_rows. |
Outputs
| Type | Description |
|---|---|
STRING | The selected lines joined into a single string with newlines. |
COMBO | The same selected lines as a COMBO/list value, preserving order. Useful for downstream nodes that accept line lists or combo-style inputs. |
Usage Notes
- Indices are zero-based: the first line is
0, the second is1, and so on. - The defaults (
start_index=0,max_rows=1000,remove_empty_lines=true) effectively return the entire prompt with empty lines removed. If the prompt contains more than 1000 non-empty lines, only the first 1000 are returned. - If
start_indexpoints past the last available line, the output is empty. - Because
max_rowshas a minimum of1, you cannot explicitly request zero rows. To produce empty output, use astart_indexpast the end of the prompt or pass an empty prompt. - The default
promptvalue is the literal stringtext, so an unwiredpromptinput still produces a valid single-line selection. - The
COMBOoutput is useful when the selected lines need to be consumed as individual items rather than as one combined text block.
Comments
Sign in with GitHub to join the discussion.