Calc AI function

The AI function allows you to integrate AI capabilities into your Automize calculations and processes.

Help CentreFunctions & Formulas

For a full list of available calculation functions, please read What calculation functions are supported.

This article describes the formula syntax and usage of the AI function.


Description

The AI function allows you to integrate AI capabilities into your Automize calculations and processes. You can use it to generate text, summarize content, translate languages, and more, leveraging the power of AI directly within your automation workflows.


Syntax

AI(prompt, [model], [temperature], [max_tokens])

The AI function syntax has the following arguments:

  • prompt - Required. The text prompt or instruction you want to send to the AI model.
  • model - Optional. The AI model to use (e.g., "gpt-4"). If not specified, the default model will be used.
  • temperature - Optional. A value between 0 and 1 that controls the randomness of the output. Higher values produce more random results.
  • max_tokens - Optional. The maximum number of tokens to generate in the response.

Example

FormulaDescriptionResult
=AI("Summarize the following text: 'Automize is a powerful automation platform.'", "gpt-4", 0.5, 50)Generates a summary of the provided text using the GPT-4 model."Automize is a robust platform for creating automated workflows."
=AI("Translate 'Hello, world!' to Spanish", "gpt-4", 0.3, 20)Translates the given text into Spanish using the GPT-4 model."¡Hola, mundo!"

Input parameters

ParameterRequiredTypeDefaultDescription
PromptYesText (multi-line)The AI instruction or question to process.
VariableYesTextVariable to store the AI response.

Output variables

VariableTypeDescription
VariableTextThe AI-generated response.

Errors

ErrorDescription
AI service unavailableThe AI service could not be reached.
Invalid promptThe prompt is empty or invalid.

For a full list of formula errors, please read Formula errors.


Tips

  • Be specific and clear in your prompts for better results.
  • Use variables in prompts to include dynamic data, e.g. 'Summarise: {document_text}'.

Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.