Skip to main content

Helpers

info

This page may contain outdated information. It will be updated as soon as possible.

Chat memory​

This component retrieves stored chat messages based on a specific session ID.

Parameters​

  • Sender type: Choose the sender type from options like "Machine", "User", or "Both".
  • Sender name: (Optional) The name of the sender.
  • Number of messages: Number of messages to retrieve.
  • Session ID: The session ID of the chat history.
  • Order: Choose the message order, either "Ascending" or "Descending".
  • Data template: (Optional) Template to convert a record to text. If left empty, the system dynamically sets it to the record's text key.

Combine text​

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

Parameters​

  • First text: The first text input to concatenate.
  • Second text: The second text input to concatenate.
  • Delimiter: A string used to separate the two text inputs. Defaults to a space.

Create record​

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

Parameters​

  • Number of fields: Number of fields to be added to the record.
  • Text key: Key used as text.

Custom component​

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

Parameters​

  • Parameter: Describe the purpose of this parameter.

INFO

Customize the build_config and build methods according to your requirements.

Learn more about creating custom components at Custom Component.


Documents to Data​

Convert LangChain documents into Data.

Parameters​

  • Documents: Documents to be converted into Data.

ID generator​

Generates a unique ID.

Parameters​

  • Value: Unique ID generated.

Message history​

Retrieves stored chat messages based on a specific session ID.

Parameters​

  • Sender type: Options for the sender type.
  • Sender name: Sender name.
  • Number of messages: Number of messages to retrieve.
  • Session ID: Session ID of the chat history.
  • Order: Order of the messages.

Data to text​

Convert Data into plain text following a specified template.

Parameters​

  • Data: The Data to convert to text.
  • Template: The template used for formatting the Data. It can contain keys like {text}, {data}, or any other key in the record.

Split text​

Split text into chunks of a specified length.

Parameters​

  • Texts: Texts to split.
  • Separators: Characters to split on. Defaults to a space.
  • Max chunk size: The maximum length (in characters) of each chunk.
  • Chunk overlap: The amount of character overlap between chunks.
  • Recursive: Whether to split recursively.

Update record​

Update a record with text-based key/value pairs, similar to updating a Python dictionary.

Parameters​

  • Data: The record to update.
  • New data: The new data to update the record with.

Hi, how can I help you?