Selector de Prompts:
SelectorDePrompts is a versatile node designed to manage and manipulate multiple text prompts efficiently. Its primary function is to select and combine active prompts based on user-defined criteria, offering flexibility in how prompts are processed and utilized. This node is particularly beneficial for scenarios where multiple prompts need to be managed simultaneously, allowing you to specify which prompts are active and how they should be combined. By providing options to handle inactive prompts and control the output format, SelectorDePrompts ensures that you can tailor the prompt selection process to fit your specific needs, enhancing the overall workflow in creative projects.
Selector de Prompts Input Parameters:
fallback
The fallback parameter determines the action to take when no active prompts are found. If set to "error," the node will raise an error when no prompts are active. Otherwise, it will return the first prompt as a fallback. This parameter is crucial for ensuring that the node behaves predictably in cases where no prompts are selected. There are no specific minimum or maximum values, but it typically accepts options like "error" or a default prompt.
join_with
The join_with parameter specifies the separator used to join multiple active prompts. This allows you to control the formatting of the combined output, ensuring that the prompts are concatenated in a way that suits your needs. Common options include newline characters or custom strings, with the default being a double newline (\n\n).
mode
The mode parameter defines how the node handles multiple active prompts. In "single_only" mode, the node will raise an error if more than one prompt is active, enforcing a single prompt output. This parameter is essential for scenarios where only one prompt should be processed at a time, providing control over the prompt selection process. Options typically include "single_only" and other modes that allow multiple prompts.
kwargs
The kwargs parameter is a flexible input that allows you to specify which prompts are active and provide their text. It uses a dictionary-like structure where keys such as on1, on2, etc., indicate whether a prompt is active, and p1, p2, etc., provide the corresponding prompt text. This parameter is crucial for dynamically managing multiple prompts, enabling you to activate or deactivate prompts as needed.
Selector de Prompts Output Parameters:
text
The text output parameter provides the final combined text of all active prompts. This output is crucial as it represents the result of the prompt selection and combination process, ready for further use in your creative projects. The text is formatted according to the join_with parameter, ensuring that the output meets your specified requirements.
Selector de Prompts Usage Tips:
- Use the
fallbackparameter to ensure that your workflow continues smoothly even when no prompts are active, by providing a default prompt or handling errors gracefully. - Experiment with different
join_withseparators to achieve the desired formatting for your combined prompts, especially when integrating them into larger text structures. - Utilize the
modeparameter to enforce strict prompt selection rules, such as ensuring only one prompt is active when necessary, to maintain control over the output.
Selector de Prompts Common Errors and Solutions:
❌ Ningún prompt activo o todos están vacíos.
- Explanation: This error occurs when no prompts are active, and the
fallbackparameter is set to "error." - Solution: Ensure that at least one prompt is active or change the
fallbackparameter to provide a default prompt instead of raising an error.
❌ Modo single_only con <number> prompts activos: <list_of_prompts>.
- Explanation: This error is triggered when the
modeis set to "single_only," but multiple prompts are active. - Solution: Deactivate additional prompts to ensure only one is active, or change the
modeto allow multiple prompts.
