RAI Menu Actions
RAI menu actions are AI assistance actions that facilitate various automation use cases.
Last updated
RAI menu actions are AI assistance actions that facilitate various automation use cases.
Last updated
RAI allows using text prompts, as well as images, which can be copied and pasted into the prompt space to include them in the conversation (e.g. create description based on this product image).
When RAI is activated on a screen, it starts a conversation thread, and uses memory of that thread in consequtive actions and answers. To clear its memory and restart, RAI dialog can be closed and reopened.
All AI menu actions support the following special properties:
Prompts: List of label, content pairs providing a predefined list of prompts that users can start with
Path: Special path on api/ai to call AI actions (default is specific to action type)
Params: List of special parameters to pass on to AI service, such as:
assistantId: ID of the AI assistant to utilize
Allows manipulation of value widgets (including text, code, template type inputs). This action can be used for a variety of use case, such as:
Generating, rewording or summarizing text content such as product descriptions
Generating or revising Handlebars templates used in CMS modules
Generating or revising custom scripts or JMESPath patterns used in Saga flows
By default, GPT_ASSISTANT_TEXT environment variable is used to identify the assistant ID to use for AI interactions.
Allows translation of localized text and objects. This action is used with Localized Editors, and allows selection of source and target languages for translation, based on editor's configuration.
By default, GPT_ASSISTANT_TRANSLATE environment variable is used to identify the assistant ID to use for AI interactions.
Allows population of a data model (e.g. creating a product entry) using a predefined schema.
This action has the following special property:
Schema: JSON schema to utilize for populating data
By default, GPT_ASSISTANT_ANY environment variable is used to identify the assistant ID to use for AI interactions.
Allows creation of new Saga flows.
By default, GPT_ASSISTANT_SAGA environment variable is used to identify the assistant ID to use for AI interactions.
Allows creation of new Runner entries.
By default, GPT_ASSISTANT_RUNNER environment variable is used to identify the assistant ID to use for AI interactions.
Allows creation of new Query entries.
By default, GPT_ASSISTANT_QUERY environment variable is used to identify the assistant ID to use for AI interactions.
Allows creation of new UI entries.
By default, GPT_ASSISTANT_UI environment variable is used to identify the assistant ID to use for AI interactions.
Allows creation of new JSON Schema entries. It is possible to paste screenshot of a database table image with field names to generate JSON schemas from ER diagrams on this action.
By default, GPT_ASSISTANT_SCHEMA environment variable is used to identify the assistant ID to use for AI interactions.
Allows creation of new App entries.
By default, GPT_ASSISTANT_APP environment variable is used to identify the assistant ID to use for AI interactions.
To enable RAI menu actions, "OPENAI_API_KEY" environment variable must be present in admin UI deployments.
RAI assistants need to be created before the first use, which can be performed by using POST /api/[type]/assistant endpoints if the "OPENAI_API_KEY" is configured.
After the first initialization, it is possible to manipulate prompts and tools of these assistants directly from the OpenAI dashboard and can be reset using PATCH /api/[type]/assistant endpoint.
All assistants are accessible through POST /api/[type] endpoints, passing commands as "content" input.
Once the assistants are created, either assistantIds can be configured for each menu action separately, or the "GPT_ASSISTANT_%" environment variables mentioned in this section can be configured for the admin UI deployments.