Input Node

Overview

The Input Node serves as the entry point for data into your flow. It allows you to define and configure input variables that will be used throughout your flow. The input node automatically includes a mandatory "query" input, which can accept either a string or an array of chat messages, making it versatile for both simple text inputs and complex chat interactions.

Usage cost: 0 credit

Configuration

Settings

  1. Query Input (Default, non-removable):

    • Type: string or ChatMessage[]

    • Required: Yes

    • Handles both simple text and chat history

  2. Custom Inputs (User-defined):

    • Name: Unique identifier for the input

    • Type: Choose from:

      • Basic Types: string, number, boolean, object, any

      • Array Types: string[], number[], object[], ChatMessage[]

      • Document Types: pdf, pptx, markdown, csv, json, docx, odt

    • Required: Toggle whether the input is mandatory

Output

The node dynamically generates outputs based on your configured inputs. By default, it includes:

  1. Default outputs (always present):

    • user_message (string): The latest user message

    • complete_chat_prompt (ChatMessage[]): Full chat history including the latest message

    • message_history (ChatMessage[]): Chat history excluding the latest message

  2. Custom outputs (based on configured inputs):

    • For regular inputs: Output matches the configured input name and type

    • For file inputs: Creates two outputs per file:

      • {input_name}_full: Complete document content

      • {input_name}_pages: Array of individual pages/sections

Best Practices

  1. Naming Conventions

    • Use clear, descriptive names for inputs

    • Avoid special characters and spaces

  2. Input Organization

    • Group related inputs together

    • Place required inputs first

    • Keep the number of inputs minimal and focused

  3. Type Selection

    • Use specific types instead of 'any' when possible

Last updated