Skip to main content
Batching allows you to process multiple inputs efficiently in Odella. This is particularly useful when you need to apply the same operation to a list of items.

Understanding Batching

Batching in Odella refers to the process of applying an operation to multiple inputs in sequence or parallel. Let’s explore this concept using the Ask AI node as an example.
  1. Open the “6. Batching” folder in the Odella interface.
  2. Locate the flow that demonstrates batching with the Ask AI node.

Using the Ask AI Node for Batching

The Ask AI node is perfect for demonstrating batching. It allows you to run an AI model over a list of inputs.
Ask AI Node Batching

Setting Up the Batch

  1. Create an array of inputs you want to process.
  2. Connect this array to the Ask AI node.
  3. Enable “split mode” on the Ask AI node.
The split mode icon (usually represented by two overlapping squares) should be visible next to the node title when enabled.

Configuring Split Mode

You can configure split mode with two main options:
  • Max: Specifies the maximum number of iterations.
  • Sequential: Determines whether to process items one at a time or in parallel.
Split Mode Configuration

Running the Batch

When you run the flow:
  1. The Ask AI node will process each input in the array.
  2. You’ll get an output for each input.
Batch Output

Combining Results

After processing, you might want to combine the results:
  1. Use a Text node with split mode turned off.
  2. Connect the output array from the Ask AI node to this Text node.
  3. The Text node will automatically concatenate the results.
For more control over how results are combined, consider using the Join node.
By using batching, you can efficiently process multiple inputs, saving time and resources in your Odella workflows.