Skip to main content

Input Component

Ingest various data types into your workflow for processing and interaction with other components.

What is the Input Component?

Screenshot of Input Component in Dark Mode design

The Input component is a versatile element that allows you to introduce different types of data into your workflow. It supports various data types including:

  • Text
  • Numbers
  • Boolean values
  • JSON objects
  • Files

This component serves as the starting point for many workflows, enabling you to feed data into subsequent elements for processing, analysis, or transformation.

How to use the Input Component

  1. Add the Input component to your workflow:

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

    • Click on the Input component to open its settings panel.
    • In the "Name" field, set a descriptive name for your input (e.g., "User Query", "File Upload", "Configuration JSON").
    • From the "Input" dropdown menu, choose the type of input you want to use. The options are:
      • Text: For string inputs
      • Number: For numerical inputs
      • Boolean: For true/false inputs
      • JSON: For structured data inputs
      • File: For file uploads
  3. Connect to other components:

    • Identify the output anchor on the Input component (usually on the right side).
    • Click and drag from this anchor to create a connection.
    • Connect it to the input anchor of the next component in your workflow.

Example Usage: Text Processing with Language Model

Let's create a simple workflow that takes a user's text input and processes it using an AI language model.

Objective

Create a workflow that accepts user input and processes it using a language model.

Step-by-Step Setup

  1. Add and Configure Input Component:

    • Drag an Input component onto the canvas.
    • Set its name to "User Query".
    • Select "Text" as the input type.
  2. Add and Configure LLM Component:

    • Add a LLM component to the canvas.
    • Configure it with your desired LLM model and Credentials.
  3. Connect Components:

    • Draw a connection from the Input component's output to the LLM component's "Prompt Text" input.
  4. Add Output Component:

    • Add a String Output component to display the result.
    • Connect the LLM component's "Output Text" to the String Output component's input.
Workflow graph showing Input Component connected to LLM Component and Output Component

Best Practices

  • Use clear and descriptive names for your Input components to make your workflow more understandable.
  • When working with sensitive data, ensure you're following proper data handling and privacy practices.
  • Consider the type of data you expect to receive and choose the appropriate input type to ensure compatibility with downstream components.

By following these steps and best practices, you can create dynamic workflows that accept user input and process it through various components, enabling interactive and responsive applications. The Input component is your gateway to creating flexible and powerful data processing pipelines.