Filed Under

You’re not going to believe what’s coming to Drupal with AI!

I’ve been teaching Drupal since 2011 and have been involved in the Drupal community even longer. I’m not sure there’s ever been a better time to be in Drupal. If you’ve been keeping up with what’s happening in Starshot or Drupal CMS, this won’t be news to you. I’m writing this the day after the keynote at DrupalCon Barcelona, where Dries demoed a whole bunch of the new features coming to Drupal CMS, including AI.

Let me show you some of what’s happening. I’m on a brand-new installation of Drupal and have installed several modules: the AI core module (latest development version), content editing tools, CKEditor integration, API Explorer, as well as OpenAI as the provider (note that you’ll need a paid OpenAI service for this). Other modules include AI agents, assistant API, content types, views, web forms, and chatbot. In the description below, I’ve included a link to a video that explains how to install and set all this up.

Watch the video

 

To get started, you'll need the latest development version of the AI module (https://drupal.org/project/ai). Once installed, head over to Configuration > AI. 

Image
open ai setup

Under the agent settings, you’ll see that there’s a taxonomy agent, views, web form, node content type agent, and field type agent. You can also create an AI assistant for the chatbot. This is pretty straightforward; it’s essentially an assistant that performs tasks on a Drupal website, using the agent actions we’ve installed. In the advanced settings, there’s a pro-action prompt written for you, which you can find in the module files and add to your settings.php. Again, I recommend watching this video - https://www.youtube.com/watch?v=hptyElqmo6Q - for detailed installation instructions.

Now, click on the chatbot and ask, “What can you do?” This chatbot works with the agent, so it’s not a content chatbot—it’s an agent chatbot. This allows me to manage taxonomy, views, content types, add, edit, or remove basic information on Drupal nodes and content types, and individually manage fields.

For our site-building demo, I’ll ask, “Create a content type for hotels, including an image, field, description, and star rating 1 to 5.” After a few seconds, the chatbot generates a hotel content type with the description field, image field, and star rating field. When I add content, I see options to upload an image, select a star rating from 1 to 5, and add a description. Unbelievable!

Image
content type

 

Let’s try a taxonomy next. I’ll ask the chatbot to “Please add a taxonomy called amenities and populate it with common hotel amenities.” When the chatbot is done, it provides a quick summary of its actions and even corrects my spelling mistake on “amenities.” Then, I ask it to “add a field to the hotel content type using this taxonomy.” Without needing to redefine the taxonomy, I simply continue communicating with the chatbot. The result? A list of amenities commonly found in hotels, ready to be selected in the content type. Heading over to Content > Add Content > Hotels, I can now see the amenities available in a select list. I might want to update the display, but it’s already quite impressive.

Image
taxonomy in content type

 

These are just a few of the features coming to Drupal with AI integration. You might have noticed that I’ve also enabled AI integration within CKEditor, and there’s a lot more on the way. New automators, agents, and other features are being developed rapidly, and we’ll be covering those in future videos.