Judge Node
Functionality
The Conditional Judgment node is used to execute different process branches based on different conditions.
Judgment Types
The Conditional Judgment node can have four different judgment types:
Semantic Judgment
Use the large language model to perform a semantic judgment based on the input judgment content and autonomously select the corresponding branch.
The judgment content only requires a brief description of the content to be judged, without the need for lengthy prompts.
Boolean Function
Choose the corresponding true or false branch based on the true or false value returned from the input Python or JavaScript code. When selecting the Boolean function type, you need to input the Boolean function body code (excluding the function header def
or function
). The code must end with a return
statement that returns a true or false value. For example:
return 9.11 > 9.9
Or code that references the variable n:
const n = {{n}};
return n >= 100;
Branch Statement
Branch statements correspond to the switch-case statement in programming languages. Based on the selected variable’s value, the corresponding branch is chosen.
Concurrent Subsequent Conditions
The type of "Concurrent Subsequent Conditions" is a special judgment node used specifically for converging the results of concurrent processing. In this case, the judgment node has only one exit but multiple entries.
There are two types of concurrent subsequent conditions:
- All Branches Completed:Only when all connected branches are completed will the process move to the next node. This is used in scenarios where multiple parts are processed concurrently, and the results are later summarized.
- Any Branch Completed:As long as any connected branch is completed, the process will move to the next node, and the results from the remaining branches will be discarded. This is used in scenarios where speed is enhanced through competition.
Conditional Judgment
The judgment conditions need to be set on the exit connections of the judgment node. Click on the exit connection and select or input the corresponding condition.