diff --git a/en/use-dify/nodes/ifelse.mdx b/en/use-dify/nodes/ifelse.mdx index afcceec3b..0316b2a3b 100644 --- a/en/use-dify/nodes/ifelse.mdx +++ b/en/use-dify/nodes/ifelse.mdx @@ -26,11 +26,11 @@ Configure conditions to test variables using various comparison operators: - **Contains** / **Not contains** - Check if text includes specific words or phrases + **Contains** / **Not contains** - Check if the value includes specific words or phrases **Starts with** / **Ends with** - Test text beginnings or endings for pattern matching - **Is** / **Is not** - Exact value matching for precise text comparison + **Is** / **Is not** - Exact value matching diff --git a/en/use-dify/nodes/list-operator.mdx b/en/use-dify/nodes/list-operator.mdx index bd2c9af4f..e1df4b4bf 100644 --- a/en/use-dify/nodes/list-operator.mdx +++ b/en/use-dify/nodes/list-operator.mdx @@ -6,6 +6,8 @@ icon: "filter" The List Operator node processes arrays by filtering, sorting, and selecting specific elements. Use it when you need to work with mixed file uploads, large datasets, or any array data that requires separation or organization before downstream processing. +Supported input data types include `array[string]`, `array[number]`, `array[file]`, and `array[boolean]`. + List Operator interface @@ -20,16 +22,6 @@ The List Operator acts as an intelligent router, using filters to separate mixed Array processing example -## Supported Data Types - -The node handles different array types with appropriate filtering options: - -**Array[string]** - Text lists, categories, names, or any string collections - -**Array[number]** - Numeric data, scores, measurements, or calculations - -**Array[file]** - Mixed file uploads with rich metadata filtering capabilities - ## Operations ### Filtering diff --git a/en/use-dify/nodes/user-input.mdx b/en/use-dify/nodes/user-input.mdx index 933be0896..6e4aed4a9 100644 --- a/en/use-dify/nodes/user-input.mdx +++ b/en/use-dify/nodes/user-input.mdx @@ -1,13 +1,15 @@ --- title: "User Input" -description: "Entry point for workflow and chatflow applications" +description: "Collects user inputs to start workflow and chatflow applications" icon: "input-text" --- ## Introduction -The User Input node is a type of Start node where you can define what information to collect from end users when they run your application. +The User Input node allows you to define what to collect from end users as inputs for your applications. -Applications that start with this node run *on demand*, initiated by direct user interaction or API calls. You can also publish these applications as standalone web apps or MCP servers, expose them through backend service APIs, or use them as tools in other Dify applications. +Applications that start with this node run *on demand* and can be initiated by direct user interaction or API calls. + +You can also publish these applications as standalone web apps or MCP servers, expose them through backend service APIs, or use them as tools in other Dify applications. Each application canvas can contain only one User Input node. @@ -22,7 +24,7 @@ Preset input variables are system-defined and available by default. - `userinput.files`: Files uploaded by end users when they run the application. - For workflow applications, this preset variable has been considered *legacy* and maintained only for backward compatibility. + For workflow applications, this preset variable has been considered *legacy* and kept only for backward compatibility. We recommend using a [custom file input field](#file-input) instead to collect user files. @@ -31,16 +33,16 @@ Preset input variables are system-defined and available by default. ### Custom -You can configure custom input fields in a User Input node to collect information from end users. Each field becomes a variable that can be referenced by downstream nodes. For example, if you add an input field with the variable name `user_name`, you can reference it as `{{user_name}}` throughout the workflow. - -There are seven types of input fields you can choose from to handle different kinds of user input. +You can configure custom input fields in a User Input node to collect different kinds of user input. Each field becomes a variable that can be referenced by downstream nodes. - The **Label Name** is displayed to your end users. + **Label Name** is displayed to your end users. - In a chatflow application, you can **Hide** any input variable to make it invisible to the end user while keeping it available for reference within the chatflow. + In a chatflow application, you can **Hide** any user input field to make it invisible to end users while keeping it available for reference within the chatflow. + + Note that a **Required** field cannot be hidden. #### Text Input @@ -48,11 +50,11 @@ There are seven types of input fields you can choose from to handle different ki - The short-text field accepts up to 256 characters. Use it for names, email addresses, titles, or any brief text input that fits on a single line. + Accepts up to 256 characters. Use it for names, email addresses, titles, or any brief text input that fits on a single line. - The paragraph field allows long-form text without length restrictions. It gives users a multi-line text area for detailed responses or descriptions. + Allows long-form text without length restrictions. It gives users a multi-line text area for detailed responses or descriptions. @@ -61,15 +63,21 @@ There are seven types of input fields you can choose from to handle different ki - The select field displays a dropdown menu with predefined options. Users can choose only from the listed options, ensuring data consistency and preventing invalid inputs. + Displays a dropdown menu with predefined options. Users can choose only from listed options, ensuring data consistency and preventing invalid inputs. - The number field restricts input to numerical values only—ideal for quantities, ratings, IDs, or any data requiring mathematical processing. + Restricts input to numerical values only—ideal for quantities, ratings, IDs, or any data requiring mathematical processing. - The checkbox field provides a simple yes/no option. When a user checks the box, the output is `true`; otherwise, it's `false`. Use it for confirmations or any case that requires a binary choice. + Provides a simple yes/no option. When a user checks the box, the output is `true`; otherwise, it's `false`. Use it for confirmations or any case that requires a binary choice. + + + + Accepts data in JSON object format, ideal for passing complex, nested data structures into your application. + + You can optionally define a JSON schema to validate the input and guide users on the expected structure. This also allows you to reference individual properties of the object in other nodes. @@ -77,29 +85,30 @@ There are seven types of input fields you can choose from to handle different ki - The single-file field allows users to upload one file of any supported type, either from their device or via a file URL. The uploaded file is available as a variable containing file metadata (name, size, type, etc.). + Allows users to upload one file of any supported type, either from their device or via a file URL. The uploaded file is available as a variable containing file metadata (name, size, type, etc.). - The file-list field works like single-file but supports multiple file uploads at once. It's useful for handling batches of documents, images, or other files together. + Supports multiple file uploads at once. It's useful for handling batches of documents, images, or other files together. + - You can use a List Operator node to filter, sort, or extract specific files from the uploaded file list for further processing. + Use a List Operator node to filter, sort, or extract specific files from the uploaded file list for further processing. **File Processing** -Files uploaded through a User Input node must be processed appropriately by subsequent nodes. The User Input node only collects files; it does not read or parse their content. - -Therefore, you need to connect specific nodes to extract and process the file content. For example: +Since the User Input node only collects files—it does not read or parse their content—uploaded files must be processed appropriately by subsequent nodes. For example: - Document files can be routed to a Doc Extractor node for text extraction so that LLMs can understand their content. + - Images can be sent to LLM nodes with vision capabilities or specialized image processing tool nodes. + - Structured data files such as CSV or JSON can be processed with Code nodes to parse and transform the data. - When users upload multiple files with mixed types (e.g., images and documents), you can use a List Operator node to separate them by file type before routing them to appropriate processing branches. + When users upload multiple files with mixed types (e.g., images and documents), you can use a List Operator node to separate them by file type before routing them to different processing branches. ## What's Next @@ -107,5 +116,7 @@ Therefore, you need to connect specific nodes to extract and process the file co After setting up a User Input node, you can connect it to other nodes to process the collected data. Common patterns include: - Send the input to an LLM node for processing. -- Use a Knowledge Retrieval node to find relevant information based on the input. -- Route the execution path to different branches with conditional logic based on the input. \ No newline at end of file + +- Use a Knowledge Retrieval node to find information relevant to the input. + +- Create conditional branches based on the input with an If/Else node. \ No newline at end of file diff --git a/en/use-dify/nodes/variable-aggregator.mdx b/en/use-dify/nodes/variable-aggregator.mdx index db1ff6c04..07689fd0f 100644 --- a/en/use-dify/nodes/variable-aggregator.mdx +++ b/en/use-dify/nodes/variable-aggregator.mdx @@ -50,8 +50,9 @@ Connect variables from different workflow branches that you want to combine. Eac **Supported Types:** - **String** - Text outputs from different processing branches -- **Number** - Numeric calculations, scores, or measurements +- **Number** - Numeric calculations, scores, or measurements - **Object** - Structured data objects with similar schemas +- **Boolean** - True/false values - **Array** - Lists, collections, or multiple results ### Output Behavior diff --git a/en/use-dify/nodes/variable-assigner.mdx b/en/use-dify/nodes/variable-assigner.mdx index 1b29c6fb7..07a723a8c 100644 --- a/en/use-dify/nodes/variable-assigner.mdx +++ b/en/use-dify/nodes/variable-assigner.mdx @@ -37,46 +37,58 @@ Configure which conversation variables to update and specify their source data. Different variable types support different operations based on their data structure: - - **Overwrite** - Replace the entire string value with new content + + - **Overwrite** - Replace with another string variable - **Clear** - Empty the variable, setting it to null or blank + - **Clear** - Remove the current value - **Set** - Manually type in a fixed value + - **Set** - Manually assign a fixed value - - **Overwrite** - Replace the number value completely + + - **Overwrite** - Replace with another number variable - **Clear** - Set to null or empty state + - **Clear** - Remove the current value - **Set** - Manually enter a specific number value + - **Set** - Manually assign a fixed value - **Arithmetic** - Add, subtract, multiply, or divide the current value + - **Arithmetic** - Add, subtract, multiply, or divide the current value by another number + + + + - **Overwrite** - Replace with another boolean variable + + - **Clear** - Remove the current value + + - **Set** - Manually assign a fixed value - - **Overwrite** - Replace the entire object with new data + + - **Overwrite** - Replace with another object variable - **Clear** - Empty the object, removing all properties + - **Clear** - Remove the current value - **Set** - Manually define object structure and values + - **Set** - Manually define the object structure and values - - **Overwrite** - Replace the entire array with new data + + - **Overwrite** - Replace with another array variable of the same type - **Clear** - Empty the array, removing all elements + - **Clear** - Remove all elements from the array - **Append** - Add one item to the end of the array + - **Append** - Add a single element to the end of the array - **Extend** - Add multiple items from another array + - **Extend** - Add all elements from another array of the same type - **Remove** - Delete items from first or last position + - **Remove First/Last** - Remove the first or last element from the array + + + Array operations are particularly powerful for building memory systems, checklists, and conversation histories that grow over time. + + -Array operations are particularly powerful for building memory systems, checklists, and conversation histories that grow over time. ## Common Implementation Patterns