
Separator
The Separator component divides plain text inputs into multiple parts based on a chosen separator, making it easier to handle and process data in complex flows.
Component description
How the Separator component works
The Separator component is a utility in your AI workflow that splits a given text input into multiple segments based on a specified separator. This can be especially useful in scenarios where you need to process or analyze individual parts of a bulk text, such as separating paragraphs, lines, or entries in a list.
What Does the Separator Do?
The primary function of the Separator is to take an input text (for example, a long message, document, or list) and divide it into a list of smaller text chunks using a separator string of your choice (by default, this is a newline character \n). This enables downstream components to process or analyze each segment independently.
Inputs
| Name | Type | Description | Default | Required |
|---|---|---|---|---|
| Input | Message | The text to be split into segments. | (empty) | No |
| Separator | str | The string used to separate the input. | \n | No |
- Input: Provides the plain text that you want to separate. This can be any message or textual data.
- Separator: Allows you to define the character(s) that will be used to split the input. For instance, use
,for comma-separated values, or\n\nto split by paragraphs.
Outputs
| Name | Type | Description |
|---|---|---|
| Data | Message | A list of text segments after separation. |
The output is a list of text pieces, each representing a segment from the original input, split using the chosen separator.
Why Use the Separator?
- Preprocessing: Break up large texts into manageable pieces for easier processing by other AI components.
- Flexible Splitting: Choose any separator that fits your data (e.g., newlines, commas, custom tokens).
- Workflow Integration: Use the separated segments as individual inputs for summarization, classification, translation, or any other downstream processing.
Example Use Cases
- Splitting a transcript into individual sentences or paragraphs for further analysis.
- Parsing a comma-separated list into individual items.
- Breaking up user input into separate commands or queries.
Summary
The Separator component is a versatile tool for dividing text into usable segments, enhancing the flexibility and efficiency of your AI workflows. By customizing the separator, you can adapt it to a wide range of text formats and processing needs.
Frequently asked questions
- What does the Separator component do?
The Separator component splits incoming text into a list of texts using a defined separator (for example, a newline or comma), allowing for more granular processing in your workflow.
- When should I use the Separator component?
Use the Separator when you need to break down a message or input string into smaller pieces, such as handling lists, multiple instructions, or parsing user responses.
- Can I customize the separator character?
Yes. You can specify any string as the separator—such as a comma, semicolon, or custom text—to match your data’s structure.
- What type of data can the Separator process?
It works with plain text messages and outputs a list of text segments, making it versatile for various text-processing needs in your flow.
Try FlowHunt Separator
Simplify your workflows by splitting text inputs with the Separator component in FlowHunt.