Generative AI action
Use the Generative AI action to generate the output using the Generative AI functionality in a form at runtime.
-
On the form modeling bar, click
Actions and click
New.
The New action dialog box is displayed.
- On the Type list, select Generative AI.
- Change the default Name (Generative AI1) to something meaningful.
- Optional. Enter a Description for the action.
-
On the
Provider list, select the Generative AI provider to use, such as ChatGPT
OpenAI or AI Agent.
The Provider list includes the providers configured in Integration > Generative AI. See Integrate Generative AI with TotalAgility.
If you select an AI Agent provider, lists of (standard and additionally added) input and output variables appear.
-
You can set a static value or dynamic variable (form control, form variable, or global variable) for the input and output variables.
-
The output variable included in the standard variables is used to populate the chat control response.
-
- In the Input box, provide the input to the form that can be a combination of simple data types (variables, controls, and data object fields). For example, provide a String variable with the value "Which country is hosting the ICC Cricket World Cup, 2023?".
-
On the
Source list, select one of the following options:
On upgrading TotalAgility from an earlier version, if the Source was set to Inline image, the Source is set to Image.
None (default)
The response from the AI provider is based on the input provided (plain text or variables).
Image
The response is generated based on the image provided.
On the Document list, select a form control (Web capture control), form variable, or global variable of type String, and on the Mime type list, select the file type.
The following mime types are supported: GIF, JPEG, and PNG. (Default: PNG)
All Generative AI models do not support the use of images, including the Custom LLM.
Text
If the document has layout text, such as a semi-structured document (invoice, purchase order, and more) or a fixed form, text format can provide better results when compared to the results returned using a Custom LLM provider.
On the Document list, select the form control (Web capture control), form variable, or global variable of type String.
The response is generated based on the document passed as an input at runtime, and the following file types that are supported in the Transformation Designer are supported for the text source format in TotalAgility at runtime.
-
TIFF (*.tif)
-
JPEG (*.jpg)
-
PNG (*.png)
-
PDF
When you set the source format as text, the standard model configuration is used.
-
-
Optional. Select the check box for
Use seed (default: Clear) and on the
Seed list, provide an inline value or select a numeric variable. (Default: 0
and Maximum: 32,767)
The seed value increases the likelihood of obtaining more consistent results from the AI provider across repeated requests, though not guaranteed.
-
On the
Response list, select a variable (form or global) , or a form control such as
Text box, to hold the response for the provided input.
The response only supports simple type variables, Data objects, and a list within the Data object.
Based on the variable type mapped to the response, the result is displayed. For example, if you provide "When did World War II start?" as the input and map a String variable to the response, the result is displayed as "1 September 1939"; however, if you map a Date variable to the response, the result is returned as "01/09/1939".
-
Click
Add.
The newly created action is added to the table.
-
Associate the action with the control to trigger this action. See
Configure actions for form control
events. Alternatively, to call this action for a form event, associate the action with the form. See
Associate an action with a form.
When the Generative AI action is triggered:
-
The output is populated correctly, and an audit entry is recorded that the Generative AI form action is executed.
-
The correct image or text is passed to the AI provider as part of the input and the response is returned. For example, upload an image of car registration and request the AI provider to get the registration number as response.
-
You need not save the document in the Web capture control to have the Document ID populated.
-
See also: