Skip to main content

Text Input

Capture and dynamically integrate user-defined text in workflows

What is Text Input?

The Text Input node is a versatile tool that allows users to input text directly and dynamically integrate additional data through input anchors. It features a customizable text template for detailed content creation, and the capability to embed data dynamically from connected nodes.

How to use it?

To maximize the utility of the Text Input node in your workflow, follow these steps:

  1. Configure the Template:

    • In the 'Template' parameter, define the placeholder text or provide guidance on what users should input. You can include placeholders for data that will be dynamically inserted from other nodes.
  2. Adding Input Anchors (Dynamic Data Integration):

    • If your workflow requires dynamic data from other nodes, configure input anchors. These anchors can be linked to outputs from other nodes, allowing the Text Input node to receive and embed this data directly into the text template.
    • Example: If connected to a API-Input node, you can insert the current user input into a report.
  3. Connecting the Node:

    • Connect the 'prompt' output anchor to any subsequent node that processes or utilizes the string, such as data processors, language models, or output nodes.
    • Ensure that the data types and content expected by the connected node align with the output from the Text Input node.

Example of usage

Objective: Create a workflow that accepts user-provided text and produces a concise summary.

Step-by-Step Setup

  1. Add Text Input:

    • Add a Text Input node to your canvas.
    • Add an input variable.
    • Edit the template text to be: Summarize the following text:
    • Add an input variable and click the created variable to make use of it in the text. For more details on this step see the text input documentation.
  2. Add Input node

    • Add an input node.
    • Change its name to ArticleText
    • Change the type to text.
  3. Add Large Language Model:

    • Locate the Large Language Model node in your node selection.
    • Add it to the canvas.
    • Configure it with your API key and select an appropriate model.
  4. Add Output:

    • Add a String Output component to display the result.
    • Connect the output of the OpenAI component to the input of the String Output.
  5. Connect Components:

    • Link the output of the "ArticleText" Input node to the created variable in the text input node.
    • Link the text input node output to the Prompt Text of the Large Language Model node.
    • Link the Large Language Model output to the Output node.

This leaves us with the result:

Article summary graph
🔗 Related Nodes: Input, Text, Large Language Model, Output

Execution

To execute the workflow described in the step by step guide, add your article to the input nodes value field.

Additional information

Using input anchors in the Text Input node allows for the creation of highly dynamic and responsive input fields within workflows. It's essential to map the correct data types and ensure that all nodes connected upstream are configured to pass the correct data into the Text Input node. This setup encourages a seamless flow of data and reduces manual input errors, enhancing automation and efficiency.