Skip to main content

Input

Ingest various data types into your workflow

What is the Input?

The Input is a fundamental component that serves as the entry point for data in your workflow. It allows you to introduce various types of information, such as text, numbers, boolean values, JSON objects, or files, into your data processing pipeline. This versatile tool acts as the foundation for subsequent operations, enabling you to feed data into other components for manipulation, analysis, or transformation.

How to use it

  1. Add the Input:

    • Locate the Input component in the sidebar of your workflow editor.
    • Drag and drop it onto your workflow canvas.
  2. Configure the Input:

    • Double-click on the Input to open its configuration panel.
    • In the "Name" field, provide a descriptive name for your input (e.g., "UserQuery" for a text input that will contain user questions).
    • From the dropdown menu, select the appropriate data type for your input:
      • Text: For strings and longer text content
      • Number: For integer or floating-point values
      • Boolean: For true/false values
      • JSON: For structured data objects
      • File: For uploading and processing files
  3. Connect to Other Components:

    • Click and drag from the output port of the Input to the input port of the next component in your workflow.
    • Ensure that the receiving component is compatible with the data type you've selected for your Input.

Example Task: Text Summarization Workflow

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.

Best Practices

  1. Clear Naming: Use descriptive names for your Inputs to make your workflow more understandable.
  2. Documentation: Comment your workflow, especially for complex input requirements.

By mastering the use of Inputs, you can create more dynamic and interactive workflows that respond to user data or external information sources effectively.