Waterflai
  • Welcome to Waterflai
  • Getting Started
    • Concepts
    • Quickstart
  • Providers
    • Providers Overview
    • Providers setup
    • AI models
    • Choose the right models
  • Knowledge
    • Knowledge Overview
    • Knowledge connectors
    • Knowledge collections
  • Studio
    • Studio Overview
    • Studio Builders
      • Light Builder
      • Dream Builder
      • Workflow Builder
      • Flow components (nodes)
        • Input Node
        • Output Node
        • LLM model Node
        • Multimodal LLM Node
        • Dall-E 2 (image generation) Node
        • Dall-E 3 (image generation) Node
        • Sora video generation Node
        • Text-to-Speech (TTS) Node
        • Speech-to-Text (STT) Node
        • OCR Node
        • Agent Node
        • Reranker Node
        • Knowledge retrieval Node
        • Vector store insert Node
        • Vector store record delete Node
        • Gitbook loader
        • Notion Database Node
        • Figma Node
        • Webpage scraper Node
        • Sitemap Scraper Node
        • API Request Node
        • Document metadata extraction Node
        • Document metadata update Node
        • Character splitter Node
        • HTML splitter Node
        • Markdown Splitter
        • Calculator tool Node
        • Text as tool Node
        • Knowledge retrieval tool Node
        • Conditional Node
        • Iteration loop Node
      • Testing and Debugging
    • Publishing
    • Integration with API
    • Embedding in website
  • Analytics
    • Analytics Overview
    • Dashboards
    • Logs
  • Administration
    • Organization users
    • Workspace
    • Security and permissions
  • Troubleshooting
    • Support
Powered by GitBook
On this page
  • Data Types
  • Component Structure
  • Best Practices
  • Common Issues
  1. Studio
  2. Studio Builders

Flow components (nodes)

Flow Components are the building blocks used within Waterflai's flow builder to create AI-powered applications. Each component (node) serves a specific purpose and can be connected to form complex data processing and AI interaction flows.

Data Types

Before diving into specific components, it's important to understand the core data types used throughout the flows:

Basic Types

  • string: Text values

  • number: Numeric values

  • boolean: True/false values

  • object: JavaScript/JSON objects

  • any: Any type of value

Array Types

  • string[]: Array of text values

  • number[]: Array of numeric values

  • boolean[]: Array of boolean values

  • object[]: Array of objects

  • any[]: Array of any values

Special Types

  • Document: Represents a text document with metadata

    {
      page_content: string;  // The main content of the document
      metadata: {           // Associated metadata
        [key: string]: any  // Custom key-value pairs
      }
    }
  • Document[]: Array of documents

  • ChatMessage[]: Array of chat messages

    {
      role: "user" | "assistant" | "system";
      content: string | ChatMessageContent[]; // Either text-only or multimodal content
    }

Where ChatMessageContent (used mainly in multimodal cases) correspond to:

{
  type: "text" | "image_url"; // Type of content
  text?: string; // Text content if type is "text"
  image_url?: { // Image data if type is "image_url"
    [key: string]: any
  }
}
  • Tool: Represents a tool that can be used by an agent

Component Structure

Each component in a flow has:

  • Input ports: Accept incoming connections

  • Output ports: Provide data to other nodes

  • Configuration panel: Settings and parameters

  • Documentation: Usage guidelines and examples

Best Practices

  1. Flow Design

    • Keep flows modular and focused

    • Use meaningful node names (they should be unique when linked to a given other node, to allow variable reference)

    • Document complex configurations

    • Test flows incrementally

  2. Data Management

    • Validate input data

    • Consider data volume

  3. Performance

    • Optimize node configurations

    • Use appropriate batch sizes

    • Monitor execution times

Common Issues

  • Type mismatches between nodes

  • Memory limitations

  • Configuration errors

  • Connection issues

  • Resource constraints

Each component's detailed documentation provides specific configuration options, examples, and best practices for that particular node type.

PreviousWorkflow BuilderNextInput Node

Last updated 4 months ago