dotAI

Last Updated: Nov 19, 2024
documentation for the dotCMS Content Management System

dotAI integrates powerful AI tools into your dotCMS instance, allowing new horizons of automation — content and image generation, semantic searches, and more. Through workflows, dotAI is capable of performing batch operations — such as adding images to any content that's missing an image, or automatically generating SEO metadata to large swaths of content, adding content tags, and numerous other tasks.

dotAI Tool under Dev Tools toolgroup.

Currently, these integrations leverage the services of OpenAI. In future iterations, the choice of AI service provider will become a configurable option. Additionally, the dotAI features will soon be available by default; at this moment, it requires one of two activation methods:

Requirements

This feature requires the following:

  1. dotCMS Enterprise Edition, as this plugin has both Workflow and App components, both of which are Enterprise only;
  2. An OpenAI API key, obtained separately;
  3. Postgres 15 with the pgvector extension installed.
    • If you're on dotCMS Cloud, we'll handle it!
    • For self-hosted customers, see below.

Self-Hosted

For embeddings to function, a vector extension must be added to the Postgres database. The dotAI plugin will add this extension automatically, but this process requires dotCMS's database user has superuser privileges, ensuring extensions can be installed.

If the database user does not have sufficient rights, it may be necessary for IT or administrators to manually add the extension. The simplest implementation is via the pgvector/pgvector Docker tag, easily accessible via the command docker pull pgvector/pgvector. The image can be applied to a docker-compose.yml by adding it to the database section:

 db:
    image: pgvector/pgvector

Note also that these privileges are only required for the extension's installation, and not for its subsequent use.

App Configuration

A full list of the App integration fields follows:

FieldDescription
API KeyYour account's API key; must be present to utilize OpenAI services.
Model NamesA comma-separated list of the models used to generate OpenAPI responses. Including multiple models also enables fallback behavior; when a specified model is not found, the next one is used. Example: gpt-4o-mini,gpt-3.5-turbo-16k,gpt-4o
Role PromptA prompt describing the role (if any) the text generator will play for the dotCMS user.
Text PromptA prompt describing the overall writing style of generated text.
Tokens per MinutePermits configurable rate limiting for text responses based on token use.
API per MinutePermits configurable rate limiting for text responses based on API call volume.
Max TokensPermits configurable rate limiting for token consumption per API response.
Completion model enabledIf checked, causes text responses to incorporate completions. Completions are useful for interactive chat modes and other dynamic uses, capable of incorporating response histories into future responses.
Image Model NamesA comma-separated list of the image models used to generate graphical responses. Including multiple models also enables fallback behavior; when a specified model is not found, the next one is used.
Image PromptA specification of output aspect ratio. If the ratio specified differs significantly from the Image Size (below), the image will “letterbox” accordingly.
Image SizeSelects the default dimensions of generated images.
Image Tokens per MinutePermits configurable rate limiting for image responses based on token use.
Image API per MinutePermits configurable rate limiting for image responses based on API call volume.
Image Max TokensPermits configurable rate limiting for token consumption per image generation API response.
Image Completion model enabledIf checked, causes image responses to incorporate completions. Completions are useful for interactive chat modes and other dynamic uses, capable of incorporating response histories into future responses.
Embeddings Model NamesA comma-separated list of the image models used to generate graphical responses. Including multiple models also enables fallback behavior; when a specified model is not found, the next one is used.
Embeddings Tokens per MinutePermits configurable rate limiting for embeddings responses based on token use.
Embeddings API per MinutePermits configurable rate limiting for embeddings responses based on API call volume.
Embeddings Max TokensPermits configurable rate limiting for token consumption per embeddings API response.
Embeddings Completion model enabledIf checked, causes embedding responses to incorporate completions. Completions are useful for interactive chat modes and other dynamic uses, capable of incorporating response histories into future responses.
Auto Index Content ConfigAllows App-level configuration of content indexes used as the basis for text generation. Takes a JSON mapping; each property name becomes an index, and each value is the Content Type it will take as its target content. Optional; indexes are also fully configurable under the dotAI Tool. Most useful when configured in the System Host, as this will instantiate the indexes across multiple sites.
Custom PropertiesAdditional key-value pairs for dotAI configuration.

Once installed and configured, the dotCMS surfaces a variety of utilities. The section below provides a brief overview of each, and a link to further documentation.

Using dotAI

The dotAI feature includes several components, detailed separately:

ComponentDescription
dotAI ToolThe dotAI admin-panel interface can be found via Tools -> dotAI, allowing direct usage, index definition, and general configuration of the feature.
AI BlocksdotAI's integration with the Block Editor field provides the most straightforward way to get started generating content.
AI WorkflowsAI Workflow Sub-Actions permit a range of asynchronous automations utilizing AI — such as generating entire contentlets on demand.
AI ViewtoolThe AI Viewtool, accessible through $ai, allows AI operations via Velocity script.
API ResourcesREST API endpoints allow OpenAI operations to be performed headlessly.

On this page

×

We Dig Feedback

Selected excerpt:

×