Chatflow Tool
The Chatflow Tool node is a specialized tool that allows the execution of another chat flow within a project. It’s particularly useful for creating modular and reusable components in complex conversational AI systems.
Node Details
-
Name: ChatflowTool
-
Type: ChatflowTool
-
Category: Tools
-
Version: 5.0
-
Base Classes: ChatflowTool, Tool
Parameters
Main Parameters
-
Select Chatflow
-
Type: asyncOptions
-
Description: Allows selection of an existing chatflow to be used as a tool.
-
-
Tool Name
-
Type: string
-
Description: Name of the tool, used for identification.
-
-
Tool Description
-
Type: string
-
Description: Detailed description of the tool’s functionality, used by the LLM to determine when to use this tool.
-
-
Return Direct
-
Type: boolean
-
Optional: Yes
-
Description: Determines if the tool’s output should be returned directly.
-
Additional Parameters
-
Override Config
-
Type: json
-
Optional: Yes
-
Description: Allows overriding the configuration passed to the Chatflow.
-
-
Base URL
-
Type: string
-
Optional: Yes
-
Default: URL of the incoming request
-
Description: Base URL useful for executing the Chatflow through an alternative route.
-
-
Start new session per message
-
Type: boolean
-
Optional: Yes
-
Default: false
-
Description: Determines whether to continue the session with the Chatflow tool or start a new one with each interaction.
-
-
Use Question from Chat
-
Type: boolean
-
Optional: Yes
-
Description: If enabled, uses the question from the chat as input to the chatflow, overriding custom input.
-
-
Custom Input
-
Type: string
-
Optional: Yes
-
Description: Custom input to be passed to the chatflow. If empty, the LLM decides the input.
-
Credentials
-
Credential Name: chatflowApi
-
Parameters: chatflowApiKey
Input/Output
-
Input: Depends on the configuration (can be from chat or custom input)
-
Output: String response from the executed chatflow
Functionality
-
Initializes with selected parameters and credentials.
-
Creates a ChatflowTool instance with the specified configuration.
-
When called, it executes the selected chatflow using the provided input.
-
The tool makes an HTTP POST request to the specified API endpoint.
-
The response from the executed chatflow is returned as a string.
Use Cases
-
Creating modular chatbots with specialized sub-flows
-
Implementing reusable conversation components
-
Building complex, multi-stage conversational AI systems
-
Integrating different chatflows for varied functionalities within a single conversation
Notes
-
The tool uses a Node.js VM for executing the API call, allowing for secure and isolated execution.
-
It supports both continuation of existing sessions and starting new sessions per interaction.
-
The tool can override configurations, allowing for flexible usage in different contexts.
Was this page helpful?