Generate Text Block
Use an AI model to generate text in your AI Agents.
Last updated
Use an AI model to generate text in your AI Agents.
Last updated
The Generate Text Block sends a text prompt to an AI model and returns the AI Model’s response.
Define the instructions sent to the AI model. Use {{variables}}
to make the prompt dynamic and context-aware.
Choose how the AI response is handled:
Display to User (Default): Shows the response to the end user.
Assign to Variable: Creates a new variable and saves the AI model’s response to it. Enter a variable_name
****to store the response for later use in the workflow.
Choose the format of the AI response:
Outputs plain or markdown-formatted text, suitable for display or emails.
Outputs the response in JSON format, ideal for structured data outputs required for integrations or further processing via code.
Example Schema:
Outputs data in CSV format, ideal for tabular data or spreadsheets.
Example Schema:
For both JSON and CSV outputs, you can explicitly define the output structure by providing a sample output schema.
The default setting is inherited from the underlying model configured in the Model Settings Tab. You can override this setting by choosing and configuring a different AI Model specifically for this block.
Model Selection: Choose a different model if needed for the block.
Temperature: Adjust randomness in the response:
Lower values = more predictable, consistent results.
Higher values = more creative, varied responses.
Response Length: Limit the output size in tokens to suit your needs.
The Generate Text Block supports conditional logic to dynamically adjust the text prompt based on workflow variables. This is done using {{#if}}
, {{else}}
, and {{/if}}
statements.
Example:
Combine multiple {{#if}}
statements for complex logic: