Skip to main content

Processing components in Langflow

Processing components process and transform data within a flow.

Use a processing component in a flow

The Split Text processing component in this flow splits the incoming data into chunks to be embedded into the vector store component.

The component offers control over chunk size, overlap, and separator, which affect context and granularity in vector store retrieval results.

Combine Text

This component concatenates two text sources into a single text chunk using a specified delimiter.

Inputs

NameDisplay NameInfo
first_textFirst TextThe first text input to concatenate.
second_textSecond TextThe second text input to concatenate.
delimiterDelimiterA string used to separate the two text inputs. Defaults to a space.

Filter Data

This component filters a Data object based on a list of keys.

Inputs

NameDisplay NameInfo
dataDataData object to filter.
filter_criteriaFilter CriteriaList of keys to filter by.

Outputs

NameDisplay NameInfo
filtered_dataFiltered DataA new Data object containing only the key-value pairs that match the filter criteria.

Parse JSON

This component converts and extracts JSON fields using JQ queries.

Inputs

NameDisplay NameInfo
input_valueInputData object to filter. Can be a message or data object.
queryJQ QueryJQ Query to filter the data. The input is always a JSON list.

Outputs

NameDisplay NameInfo
filtered_dataFiltered DataFiltered data as a list of data objects.

Merge Data component

This component combines multiple data sources into a single unified Data object.

The component iterates through the input list of data objects, merging them into a single data object. If the input list is empty, it returns an empty data object. If there's only one input data object, it returns that object unchanged. The merging process uses the addition operator to combine data objects.

Inputs

NameDisplay NameInfo
dataDataA list of data objects to be merged

Outputs

NameDisplay NameInfo
merged_dataMerged DataA single data object containing the combined information from all input data objects

Parse Data

The ParseData component converts data objects into plain text using a specified template. This component transforms structured data into human-readable text formats, allowing for customizable output through the use of templates.

Inputs

NameDisplay NameInfo
dataDataThe data to convert to text.
templateTemplateThe template to use for formatting the data. It can contain the keys {text}, {data} or any other key in the data.
sepSeparatorThe separator to use between multiple data items.

Outputs

NameDisplay NameInfo
textTextThe resulting formatted text string as a message object.

Split Text

This component splits text into chunks of a specified length.

Inputs

NameDisplay NameInfo
textsTextsTexts to split.
separatorsSeparatorsCharacters to split on. Defaults to a space.
max_chunk_sizeMax Chunk SizeThe maximum length, in characters, of each chunk.
chunk_overlapChunk OverlapThe amount of character overlap between chunks.
recursiveRecursiveWhether to split recursively.

Hi, how can I help you?