Skip to main content

Helpers

Helper components provide utility functions to help manage data, tasks, and other components in your flow.

Chat Memory​

This component retrieves and manages chat messages from Langflow tables or an external memory.

Parameters​

Inputs​

NameDisplay NameInfo
memoryExternal MemoryRetrieve messages from an external memory. If empty, it will use the Langflow tables.
senderSender TypeFilter by sender type.
sender_nameSender NameFilter by sender name.
n_messagesNumber of MessagesNumber of messages to retrieve.
session_idSession IDThe session ID of the chat. If empty, the current session ID parameter will be used.
orderOrderOrder of the messages.
templateTemplateThe template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.

Outputs​

NameDisplay NameInfo
messagesMessages (Data)Retrieved messages as Data objects.
messages_textMessages (Text)Retrieved messages formatted as text.
lc_memoryMemoryBuilt LangChain memory object.

Combine Text​

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

Parameters​

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.

Create List​

This component dynamically creates a record with a specified number of fields.

Parameters​

Inputs​

NameDisplay NameInfo
n_fieldsNumber of FieldsNumber of fields to be added to the record.
text_keyText KeyKey used as text.

Custom Component​

Use this component as a template to create your custom component.

For more, see Custom Components.

Filter Data​

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

Parameters​

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.

Hierarchical Task​

This component creates and manages hierarchical tasks for CrewAI agents in a Playground environment.

For more information, see the CrewAI documentation.

Parameters​

Inputs​

NameDisplay NameInfo
task_descriptionDescriptionDescriptive text detailing task's purpose and execution.
expected_outputExpected OutputClear definition of expected task outcome.
toolsToolsList of tools/resources limited for task execution. Uses the Agent tools by default.

Outputs​

NameDisplay NameInfo
task_outputTaskThe built hierarchical task.

ID Generator​

This component generates a unique ID.

Parameters​

Outputs​

NameDisplay NameInfo
valueValueUnique ID generated.

Parse JSON​

This component converts and extracts JSON fields using JQ queries.

Parameters​

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​

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.

Parameters​

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.

Parameters​

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

Sequential Task​

This component creates and manage sequential tasks for CrewAI agents. It builds a SequentialTask object with the provided description, expected output, and agent, allowing for the specification of tools and asynchronous execution.

For more information, see the CrewAI documentation.

Parameters​

Inputs​

NameDisplay NameInfo
task_descriptionDescriptionDescriptive text detailing task's purpose and execution.
expected_outputExpected OutputClear definition of expected task outcome.
toolsToolsList of tools/resources limited for task execution. Uses the Agent tools by default.
agentAgentCrewAI Agent that will perform the task.
taskTaskCrewAI Task that will perform the task.
async_executionAsync ExecutionBoolean flag indicating asynchronous task execution.

Outputs​

NameDisplay NameInfo
task_outputTaskThe built sequential task or list of tasks.

Split Text​

This component splits text into chunks of a specified length.

Parameters​

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.

Store Message​

This component stores chat messages or text into Langflow tables or an external memory.

It provides flexibility in managing message storage and retrieval within a chat system.

Parameters​

Inputs​

NameDisplay NameInfo
messageMessageThe chat message to be stored. (Required)
memoryExternal MemoryThe external memory to store the message. If empty, it will use the Langflow tables.
senderSenderThe sender of the message. Can be Machine or User. If empty, the current sender parameter will be used.
sender_nameSender NameThe name of the sender. Can be AI or User. If empty, the current sender parameter will be used.
session_idSession IDThe session ID of the chat. If empty, the current session ID parameter will be used.

Outputs​

NameDisplay NameInfo
stored_messagesStored MessagesThe list of stored messages after the current message has been added.

Hi, how can I help you?