Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:FlowiseAI Flowise RateLimit

From Leeroopedia
Knowledge Sources
Domains Chatbot Configuration, API Security
Last Updated 2026-02-12 07:00 GMT

Overview

RateLimit is a React component that provides a configuration form for enabling and customizing API rate limiting on a chatflow.

Description

This component renders a configuration panel with a "Enable Rate Limit" toggle switch and, when enabled, three input fields: "Message Limit per Duration" (number), "Duration in Second" (number), and "Limit Message" (string for the error message shown when limits are exceeded). The Save button is disabled when rate limiting is enabled but any of the three fields are empty. The component reads the current chatflow's apiConfig.rateLimit from the Redux store on initialization. On save, it validates that all three fields are filled (throwing an error if only partially filled), then persists the configuration via chatflowsApi.updateChatflow and dispatches SET_CHATFLOW. The component also includes a tooltip with a link to the Flowise rate limit documentation.

Usage

Use this component within the chatflow settings panel to configure rate limiting for the chatflow's API endpoint.

Code Reference

Source Location

Signature

const RateLimit = ({ dialogProps }) => { ... }

RateLimit.propTypes = {
    isSessionMemory: PropTypes.bool,
    dialogProps: PropTypes.object
}

export default RateLimit

Import

import RateLimit from '@/ui-component/extended/RateLimit'

I/O Contract

Inputs

Name Type Required Description
dialogProps object Yes Configuration object containing chatflow (object with apiConfig JSON string including rateLimit settings)
isSessionMemory bool No Unused prop declared in propTypes (reserved for future use)

Outputs

Name Type Description
React Element JSX.Element Renders a Stack with a toggle switch, rate limit input fields, and a Save button

Usage Examples

Basic Usage

import RateLimit from '@/ui-component/extended/RateLimit'

const MyComponent = () => {
    const dialogProps = {
        chatflow: {
            id: 'chatflow-123',
            apiConfig: JSON.stringify({
                rateLimit: {
                    status: true,
                    limitMax: '10',
                    limitDuration: '60',
                    limitMsg: 'Too many requests. Please try again later.'
                }
            })
        }
    }

    return <RateLimit dialogProps={dialogProps} />
}

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment