From 5f5730322156a7e1ec9e42aa5295ba14dbe1a4c2 Mon Sep 17 00:00:00 2001 From: Yeuoly Date: Wed, 6 Aug 2025 23:17:02 +0800 Subject: [PATCH] docs: add boolean and object input type support to workflow nodes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add checkbox (boolean) and object input types to start node documentation - Update conversation variables to support boolean and array[boolean] types - Add boolean-specific operators (is/is not) to if/else node documentation - Add array[boolean] operators (contains/not contains/empty checks) to if/else node - Update all three languages: English, Chinese (zh-hans), and Japanese (ja-jp) This change aligns with the core data type expansion PRD for Boolean & Object support. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- en/guides/workflow/node/ifelse.mdx | 13 +++++++++++++ en/guides/workflow/node/start.mdx | 4 +++- en/guides/workflow/variables.mdx | 4 +++- ja-jp/guides/workflow/node/ifelse.mdx | 13 ++++++++++++- ja-jp/guides/workflow/node/start.mdx | 8 +++++++- ja-jp/guides/workflow/variables.mdx | 4 +++- zh-hans/guides/workflow/node/ifelse.mdx | 13 ++++++++++++- zh-hans/guides/workflow/node/start.mdx | 4 +++- zh-hans/guides/workflow/variables.mdx | 4 +++- 9 files changed, 59 insertions(+), 8 deletions(-) diff --git a/en/guides/workflow/node/ifelse.mdx b/en/guides/workflow/node/ifelse.mdx index a36788e6..5ff61af3 100644 --- a/en/guides/workflow/node/ifelse.mdx +++ b/en/guides/workflow/node/ifelse.mdx @@ -16,6 +16,9 @@ A conditional branching node has three parts: **Condition Types** +The available condition types depend on the variable's data type: + +**For String/Number/Object variables:** * Contains * Not contains * Starts with @@ -25,6 +28,16 @@ A conditional branching node has three parts: * Is empty * Is not empty +**For Boolean variables:** +* Is (True/False) +* Is not (True/False) + +**For Array[Boolean] variables:** +* Contains (True/False) +* Not contains (True/False) +* Is empty +* Is not empty + *** ### Scenario diff --git a/en/guides/workflow/node/start.mdx b/en/guides/workflow/node/start.mdx index 7cf8bfc8..f96f9cf1 100644 --- a/en/guides/workflow/node/start.mdx +++ b/en/guides/workflow/node/start.mdx @@ -18,12 +18,14 @@ Input field is configured by application developers to prompt users for addition For example, in a weekly report application, users might be required to provide background information such as name, work date range, and work details in a specific format. This preliminary information helps the LLM generate higher quality responses. -Six types of input variables are supported, all of which can be set as required: +Eight types of input variables are supported, all of which can be set as required: * **Text:** Short text, filled in by the user, with a maximum length of 256 characters. * **Paragraph:** Long text, allowing users to input longer content. * **Select:** Fixed options set by the developer; users can only select from preset options and cannot input custom content. * **Number:** Only allows numerical input. +* **Checkbox:** Boolean input rendered as a checkbox, allowing users to select true/false values. +* **Object:** Structured JSON input that allows users to provide complex data objects. Only available in Workflow/Chatflow applications. * **Single File:** Allows users to upload a single file. Supports document types, images, audio, video, and other file types. Users can upload locally or paste a file URL. For detailed usage, refer to File Upload. * **File List:** Allows users to batch upload files. Supports document types, images, audio, video, and other file types. Users can upload locally or paste file URLs. For detailed usage, refer to File Upload. diff --git a/en/guides/workflow/variables.mdx b/en/guides/workflow/variables.mdx index aa027251..8aafa87d 100644 --- a/en/guides/workflow/variables.mdx +++ b/en/guides/workflow/variables.mdx @@ -114,14 +114,16 @@ For example, you can store the language preference input by the user in the firs ![Conversation Variable](https://assets-docs.dify.ai/dify-enterprise-mintlify/en/guides/workflow/c04285fec92f13a20ccbd3e21361a30d.png) -**Conversation variables** support the following six data types: +**Conversation variables** support the following eight data types: * String * Number * Object +* Boolean * Array\[string] * Array\[number] * Array\[object] +* Array\[boolean] **Conversation variables** have the following features: diff --git a/ja-jp/guides/workflow/node/ifelse.mdx b/ja-jp/guides/workflow/node/ifelse.mdx index 277882a1..08fa3af6 100644 --- a/ja-jp/guides/workflow/node/ifelse.mdx +++ b/ja-jp/guides/workflow/node/ifelse.mdx @@ -19,8 +19,9 @@ if/else 条件に基づいてチャットフローとワークフローを2つ **条件の種類** -次の条件タイプの設定をサポートします: +利用可能な条件タイプは変数のデータ型によって異なります: +**文字列/数値/オブジェクト変数の場合:** * 含む(Contains) * 含まない(Not contains) * ..から始まる(Start with) @@ -30,6 +31,16 @@ if/else 条件に基づいてチャットフローとワークフローを2つ * 空である(Is empty) * 空ではない(Is not empty) +**ブール値変数の場合:** +* である(Is)- 真/偽 +* ではない(Is not)- 真/偽 + +**ブール値配列変数の場合:** +* 含む(Contains)- 真/偽 +* 含まない(Not contains)- 真/偽 +* 空である(Is empty) +* 空ではない(Is not empty) + *** ### シナリオ diff --git a/ja-jp/guides/workflow/node/start.mdx b/ja-jp/guides/workflow/node/start.mdx index 46d642f5..d8f447df 100644 --- a/ja-jp/guides/workflow/node/start.mdx +++ b/ja-jp/guides/workflow/node/start.mdx @@ -19,7 +19,7 @@ version: '日本語' 入力フィールドの機能はアプリ開発者によって設定され、通常はアプリの使用者がさらに情報を提供するために使用されます。例えば、週次報告アプリでは、使用者に対して名前、作業期間、作業内容などの背景情報をあらかじめフォーマットに従って提供するよう求めることがあります。これらの前提情報は、LLM(大規模言語モデル)がより質の高い回答を生成するのに役立ちます。 -以下の6種類の入力変数をサポートしており、すべての変数は必須項目として設定可能です: +以下の8種類の入力変数をサポートしており、すべての変数は必須項目として設定可能です: * **テキスト** @@ -33,6 +33,12 @@ version: '日本語' * **数字** 数字のみの入力を許可します。 +* **チェックボックス** + + ブール値入力で、チェックボックスとして表示され、ユーザーが真/偽の値を選択できます。 +* **オブジェクト** + + 構造化されたJSON入力で、ユーザーが複雑なデータオブジェクトを提供できます。ワークフロー/チャットフローアプリでのみ使用可能です。 * **単一ファイル** アプリ使用者が単独でファイルをアップロードできる機能で、サポートされるファイルタイプは文書、画像、音声、動画、その他のファイルです。ローカルからのファイルアップロードやファイルのURLを貼り付けてのアップロードが可能です。詳細な使い方については[ファイルアップロード](/ja-jp/guides/workflow/file-upload)を参照してください。 diff --git a/ja-jp/guides/workflow/variables.mdx b/ja-jp/guides/workflow/variables.mdx index ca7e9285..f075f003 100644 --- a/ja-jp/guides/workflow/variables.mdx +++ b/ja-jp/guides/workflow/variables.mdx @@ -166,14 +166,16 @@ title: 変数 -**会話変数**は以下の6つのデータ型をサポートしています: +**会話変数**は以下の8つのデータ型をサポートしています: * String 文字列 * Number 数値 * Object オブジェクト +* Boolean ブール値 * Array\[string] 文字列の配列 * Array\[number] 数値の配列 * Array\[object] オブジェクトの配列 +* Array\[boolean] ブール値の配列 **会話変数**は以下の特徴を持ちます: diff --git a/zh-hans/guides/workflow/node/ifelse.mdx b/zh-hans/guides/workflow/node/ifelse.mdx index 4a06e36b..d6a06014 100644 --- a/zh-hans/guides/workflow/node/ifelse.mdx +++ b/zh-hans/guides/workflow/node/ifelse.mdx @@ -18,8 +18,9 @@ title: 条件分支 **条件类型** -支持设置以下条件类型: +支持的条件类型取决于变量的数据类型: +**字符串/数字/对象变量:** * 包含(Contains) * 不包含(Not contains) * 开始是(Start with) @@ -29,6 +30,16 @@ title: 条件分支 * 为空(Is empty) * 不为空(Is not empty) +**布尔值变量:** +* 是(Is)- 真/假 +* 不是(Is not)- 真/假 + +**布尔值数组变量:** +* 包含(Contains)- 真/假 +* 不包含(Not contains)- 真/假 +* 为空(Is empty) +* 不为空(Is not empty) + *** ### 场景 diff --git a/zh-hans/guides/workflow/node/start.mdx b/zh-hans/guides/workflow/node/start.mdx index 112b587a..e4e7fb9a 100644 --- a/zh-hans/guides/workflow/node/start.mdx +++ b/zh-hans/guides/workflow/node/start.mdx @@ -16,12 +16,14 @@ title: 开始 输入字段功能由应用开发者设置,通常用于让应用使用者主动补全更多信息。例如在周报应用中要求使用者按照格式预先提供更多背景信息,如姓名、工作日期区间、工作详情等。这些前置信息将有助于 LLM 生成质量更高的答复。 -支持以下六种类型输入变量,所有变量均可设置为必填项: +支持以下八种类型输入变量,所有变量均可设置为必填项: * **文本**:短文本,由应用使用者自行填写内容,最大长度 256 字符。 * **段落**:长文本,允许应用使用者输入较长字符。 * **下拉选项**:由应用开发者固定选项,应用使用者仅能选择预设选项,无法自行填写内容。 * **数字**:仅允许用户输入数字。 +* **复选框**:布尔值输入,以复选框形式呈现,允许用户选择真/假值。 +* **对象**:结构化 JSON 输入,允许用户提供复杂的数据对象。仅在工作流/聊天流应用中可用。 * **单文件**:允许应用使用者单独上传文件,支持文档类型文件、图片、音频、视频和其它文件类型。支持通过本地上传文件或粘贴文件 URL。详细用法请参考[文件上传](/zh-hans/guides/workflow/file-upload)。 * **文件列表**:允许应用使用者批量上传文件,支持文档类型文件、图片、音频、视频和其它文件类型。支持通过本地上传文件或粘贴文件 URL。详细用法请参考[文件上传](/zh-hans/guides/workflow/file-upload)。 diff --git a/zh-hans/guides/workflow/variables.mdx b/zh-hans/guides/workflow/variables.mdx index 25f38185..21749bc7 100644 --- a/zh-hans/guides/workflow/variables.mdx +++ b/zh-hans/guides/workflow/variables.mdx @@ -158,14 +158,16 @@ Chatflow 类型应用提供以下系统变量: ![](https://assets-docs.dify.ai/2025/04/338f93f401142fea4936a67a615eba32.png) -**会话变量**支持以下六种数据类型: +**会话变量**支持以下八种数据类型: * String 字符串 * Number 数值 * Object 对象 +* Boolean 布尔值 * Array\[string] 字符串数组 * Array\[number] 数值数组 * Array\[object] 对象数组 +* Array\[boolean] 布尔值数组 **会话变量**具有以下特性: