Logic

Some workflows require additional logic to complete a task, such as deciding to answer with different prompts or models and selecting to call various data sources.

Logic nodeUsageApplication

Python

Allows the user to call basic python functions to reformat or analyze text coming from the workflow.

Analyze jsons, parse regular expresions, apply simple logical expressions.

Routing In

Splits the workflow in two paths, depending on a condition defined by the user.

Choose between two different data sources, choose between two different LLMs.

Routing Out

Chooses between two different paths that were split using a routing in.

Return the data source chosen by routing. Return the response of the LLM selected with routing.

These nodes operate as follows:

Routing In

The Routing In node is used to decide whether to follow a path of the LLM flow. This node receives two inputs:

  • The content: The message that it will send between one of the two paths

  • The selection: A message with the words "True" or "False", used to decide which of the two paths to call.

The two outputs connect to the two flow paths to choose from.

Routing out

The "Routing out" node works with the "Routing in" node to select the correct output based on the initial routing logic.

Last updated