UChat Official

Introduction

In recent updates, significant improvements have been made to the custom input feature within the AI agent node.

This enhancement aims to provide users with greater control over how inputs—such as text, images, and audio—are processed before reaching the AI agent.

The update addresses previous issues where image and audio inputs were automatically processed even when the AI agent was stopped, leading to unintended behaviors and user frustrations.

This summary offers a detailed explanation of the new logic, its practical applications, and best practices for implementation, ensuring users can optimize their workflows effectively.

Deep Dive into the Updated Custom Input Feature

What is the Custom Input Feature?

The custom input feature allows users to assign their own variables to inputs, instead of directly feeding raw data (like loss text, images, or audio) into the AI agent. This setup enables preprocessing, formatting, or filtering of inputs before they are sent for AI processing.

Key Changes in Logic

Aspect

Previous Behavior

Updated Behavior

Impact

Image & Audio Inputs

Automatically processed even if AI agent was stopped

No longer processed automatically if a custom variable is set

Prevents unintended processing, giving users control

Custom Text Variable

Directly fed into AI agent

User-defined variable used as input

Facilitates preformatting and preprocessing

Processing Triggers

Based on default input flow

Triggered only when custom input is not set

Ensures inputs are processed intentionally

In essence, when a custom variable is assigned, image and audio inputs are ignored unless explicitly configured otherwise. This change resolves prior issues where media inputs would process unexpectedly, leading to inconsistent responses.

Practical Applications and Workflow Setup

Using Custom Input for Preprocessing

  • Text Inputs:
    Assign the last message to a custom variable, then add formatting or additional info before sending to the AI.
    Example:

    If message type is text:
        Assign message to custom variable
        Add formatting or context
        Send to AI agent
  • Audio Inputs:
    Replace native speech-to-text with your own transcription provider, then store the transcription in a custom variable.
    Example:

    Transcribe audio via custom provider
    Save transcription to custom variable
    Send to AI agent
  • Image Inputs:
    Use custom vision models or set custom fields to process images before passing them to the AI.
    Example:

    Use custom vision model
    Save processed image data
    Send to AI agent

Workflow Configuration

To leverage the new logic effectively, users should:

  1. Enable Custom Input
    Activates the feature, allowing variable assignment and media control.

  2. Activate Advanced Mode
    Ensures the AI session can be stopped and restarted as needed, preventing continuous processing.

  3. Set Up Default Replies
    Configure a default reply that triggers every time a user interacts, ensuring consistent behavior.

  4. Implement Session Management

    • After the AI reply, stop the AI agent session to reset the context.

    • Use a workflow that restarts the session for subsequent interactions.

Sample Workflow Logic:

  • User sends message or media

  • Assign input to custom variable (if applicable)

  • AI agent replies within advanced mode

  • Immediately stop the AI session to prepare for next input

This setup guarantees that each user interaction is processed intentionally, with media inputs handled according to custom configurations.

Best Practices and Recommendations

  • Use Custom Variables for Preprocessing:
    Always assign inputs to variables for formatting, transcription, or filtering.

  • Enable Advanced Mode:
    Critical for managing session lifecycle, especially when stopping and restarting AI sessions.

  • Configure Default Replies:
    Set up workflows that automatically handle user inputs, ensuring smooth interactions.

  • Control Media Processing:
    Decide whether to process images/audio natively or via custom models/providers, based on your needs.

  • Test Extensively:
    Validate workflows to ensure media inputs are handled correctly and sessions reset as intended.

Important Considerations

  • Session Management:
    Properly stopping the AI agent after each reply is essential to prevent overlapping sessions and ensure clean interactions.

  • Media Handling:
    When using custom providers or models, ensure they are correctly integrated and tested for accuracy.

  • Workflow Automation:
    Automate the process of assigning variables, formatting, and session control to minimize manual intervention.

  • Error Handling:
    Implement fallback mechanisms in case custom providers or models fail, maintaining a seamless user experience.

Final Thoughts and Support

The recent update to the custom input feature significantly enhances control over media and text processing within AI workflows.

By leveraging custom variables, advanced mode, and session management, users can create more precise, reliable, and customizable interactions. This flexibility is especially valuable for complex applications requiring tailored preprocessing, such as transcription, vision analysis, or custom formatting.

If you encounter challenges or have questions about implementing these features, support is readily available. The goal is to empower users to optimize their AI integrations, ensuring smooth, efficient, and effective interactions.