🐳Prompt解析:
The TextFormatParser node is designed to efficiently extract and process content enclosed within square brackets from a given text input. This node is particularly useful for parsing structured text where specific segments are marked for extraction, such as prompts or instructions in creative workflows. By automating the extraction of these marked segments, the node simplifies the task of handling complex text inputs, allowing you to focus on the creative aspects of your work. The node is capable of dynamically adjusting the number of outputs based on your requirements, ensuring flexibility and adaptability to various use cases. Its primary goal is to streamline the process of text parsing, making it an invaluable tool for AI artists who need to manage and manipulate text data efficiently.
🐳Prompt解析 Input Parameters:
text
The text parameter is the primary input for the node, where you provide the text containing the content you wish to extract. This text should include segments enclosed in square brackets, such as [content], which the node will identify and extract. The parameter supports multiline input, allowing you to work with extensive text blocks. By default, the text is set to a sample structure: Category: [clothing]\nColor: [red]\nInstruction: [Put a clothing on the model.]. This default helps you understand the expected format and provides a starting point for your text parsing tasks.
output_count
The output_count parameter determines the number of content segments you want to extract and return from the input text. It is an integer value with a default setting of 3, allowing you to specify between 1 and 100 outputs. This flexibility ensures that you can tailor the node's output to match the complexity and requirements of your specific task. By adjusting this parameter, you can control the granularity of the extracted data, ensuring that you receive the precise amount of information needed for your project.
🐳Prompt解析 Output Parameters:
输出_1, 输出_2, ..., 输出_100
The output parameters, named 输出_1 through 输出_100, represent the extracted content segments from the input text. Each output corresponds to a specific segment enclosed in square brackets, with the node dynamically adjusting the number of outputs based on the output_count parameter. These outputs provide you with the parsed content in a structured format, making it easy to integrate and utilize the extracted data in subsequent processes or creative tasks. The node ensures that even if fewer segments are found than requested, the outputs are padded with empty strings to meet the specified output_count.
🐳Prompt解析 Usage Tips:
- Ensure that your input text is well-structured with content clearly enclosed in square brackets to maximize the effectiveness of the node's parsing capabilities.
- Adjust the
output_countparameter to match the expected number of content segments in your text, allowing for efficient extraction and minimizing unnecessary outputs.
🐳Prompt解析 Common Errors and Solutions:
解析错误: <error_message>
- Explanation: This error occurs when there is an issue with parsing the input text, possibly due to malformed input or unexpected characters.
- Solution: Verify that your input text is correctly formatted with content enclosed in square brackets. Ensure there are no syntax errors or unsupported characters that might interfere with the parsing process.
