AI Request

2025-09-08 latest update
Beta – this function is subject to change and may not retain backward compatability! 

Send selected columns along with some instructions to an AI service, getting text and tabluar responses.

LOGIN ACCOUNT

Add an Account/API Key – switch to an Account panel to allow entry of an API Key for a selected AI service.

Account – select the account to use. Note: you can also enter a value or cell reference to a value, using the format of <AI>/<Account name> e.g. Anthropic/Trial Key.

RAW option

Enter the JSON body content to be sent to the AI. Consult the AI API documentation for examples.

Anthropic | Google | Open AI | Perplexity

ROLE/PROMPT option

Model – select (or enter) the model to use. Models can change over time – you can enter a new (unlisted) model if desired.

Role – enter the role you want the AI to play. This is typically sent to the API as a developer, system or user role field depending on the AI selected.

Instructions – enter the instructions you want the AI to follow. If you are sending data in the selected columns below, ask the AI to read the data. If you want data returned in a table, ask for the response to be in a table form with or without the original data. Refine your instructions using the AI’s web interface where you can iterate the query more easily.

Format – please specify that you want table results in CSV format, and to delimit it from “`csv to “`.

Max Tokens – a limit for the tokens to be used in the query. Default values (if there are any) reflect the capacity of the API itself.

Data Handling

SEND Selected Columns – select the columns by letter (or By Name) to be sent to the AI as part of the prompt. Note the data will be sent in CSV format and is included in your token usage — do send unnecessary columns. Remember to tell the AI to read the data in your instructions.

RECEIVE CSV Into Table – specify the name of an Analytics Edge table where CSV content will be returned. If there is no table of data returned, it will populate the table with a messsage. The text response will be provided as the main output of the function with Key-Index-Value columns.


ADD AN ACCOUNT

Which AI – select the AI service to use.

Account Name – enter a name for the account (API key)

API Key – enter the API key you got from the AI service.