Overview
A Chat Block takes in a single Prompt input which can be a single message, or an array of messages that forms the message chain. The Assemble Prompt Block is used to assemble multiple chat messages into a single prompt. It takes multiple chat messages or strings as inputs and outputs a single prompt containing all the messages. If a string is connected to any of the inputs, it will be converted to a User type chat message with the string as the message.
- Inputs
- Outputs
- Editor Settings
Inputs
| Title | Data Type | Description | Default Value | Notes |
|---|---|---|---|---|
| Message [i] | chat-message, chat-message[] | The ith chat message input to be assembled | N/A | Dynamic number of inputs based on how many connections there are |
Example: Assembling Multiple Chat Messages
Let’s say you have two Prompt blocks: one with the the AI’s text “How can I assist you today?” and the user’s response “Hello”. If you want to assemble these two messages into a single prompt to feed into a Chat Block, you can do the following:- Add an Assemble Prompt Block to your flow.
- Connect the output of the first Prompt block (AI’s message) to
Message 1of the Assemble Prompt Block. - Connect the output of the second Prompt block (user’s response) to
Message 2of the Assemble Prompt Block. - Connect the output of the Assemble Prompt Block to the
Promptinput of a Chat Block.
Example: Appending Chat Messages in a Loop
A common use case for the Assemble Prompt Block is to append chat messages in a loop. This can be achieved by using a Loop Controller Block in conjunction with the Assemble Prompt Block. Here’s how you can set this up:- Add a Loop Controller Block to your flow.
- Add an Assemble Prompt Block to your flow.
- Connect the
Output 1of the Loop Controller Block toInput 1of the Assemble Prompt Block. This will feed the output of the loop back into the Assemble Prompt Block. - Connect the
Output 1of the Assemble Prompt Block toInput 1of the Loop Controller Block. This will effectively create a feedback loop where the Assemble Prompt Block feeds back into itself. - Connect your first message to
Input 1 Defaultof the Loop Controller Block. This will be the initial message that starts the loop. - Any additional messages that you want to append during each loop iteration can be connected to
Input 2,Input 3, etc of the Assemble Prompt Block.
Max Iterations property of the Loop Controller Block.
Here’s a diagram to help visualize the setup:
This example demonstrates the power and flexibility of Odella’s block-based system, allowing you to create complex behaviors with just a few blocks.

