Dries seems to be a big force behind the AI agents in Drupal.
The first paragraph from the post is;
I’m often asked, “Will AI agents replace digital marketers and site builders?”. The answer is “yes”, at least for certain kinds of tasks.
Lets get into the tasks the AI (agents) modules can do today.
Installation
Drupal CMS comes with following AI modules out of the box:
When you search the drupal site for providers, you see there are a bunch of them. Some of them don’t have provider in their name, so if you want a specific provider try searching by name.
Minimum setup
None of the AI modules are enabled by default.
I enabled the AI agents, AI chatbot and OpenAI provider modules.
Create a key for the OpenAI provider on /admin/config/system/keys.
Go to /admin/config/ai/providers/openai and select the key you just made.
Create an AI assistant on /admin/config/ai/ai-assistant.
The following settings are important:
At first the selected model was 3.5-turbo. And then I got too many requests errors in the logs.
Go to /admin/structure/block/list/gin and add the block AI Deepchat Chatbot to a section. I added it to the content section.
For the block configuration select the AI assistant you created. I restricted the pages for the block to /admin/*. You don’t want end users to create content types, fields and taxonomies.
After saving you should see;
And now you can start creating content types with fields and taxonomies, by using the chatbot.
More AI power
To test more AI functionality I wrote following in the chatbot;
create a content type myai with a ckeditor field named content and a media field named header.
This gave me following response;
The content type MyAI has been successfully created with the following > > fields:
Content Type Details:Name: MyAI
Machine Name: myai
You can manage it further at Manage MyAI Content Type.Fields Created:
CKEditor Field:
Name: Content
You can configure this field at Content Field Configuration.Media Field:
Name: Header
You can manage this field at Header Field Configuration.Form Display Configuration:
The form display has been updated to include the CKEditor field “Content.” You can view this change at Form Display Configuration.
I enabled the AI CkEditor integration and AI image alt text modules.
I configured the CkEditor field to use the Content text format. (You can add ‘use Content text format’ to the field creation in the chatbot if you want to avoid this step)
And in the text format on /admin/config/content/formats I addedd the AI button to the toolbar. In the AI tools tab of the CKeditor plugin settings section I enabled Generate with AI.
There are more options to enable.
When I create a MyAI page I see that the editor has a AI assistent dropdown with the Generate with AI option. After generating a text this option is greyed out. After saving the node the option is enabled again.
For the header image I should have specified the widget, because the agent created a media search field, which isn’t user friendly.
You can’t remove or change field with the agents.
So if you don’t want to make my mistake you can use following text;
create a content type myai with a ckeditor field named content and a media field named header with the media library widget.
Now that the field is fixed, I add this image.
After I clicked on the Generate with AI button I got; Colorful TV test pattern with “No Signal” text.
Good enough for me.
Conclusion
I could go further and add AI translation, AI field validation and views, webform and module agents. But I think you already have a good idea what the AI possibilities are at the moment.
I have to say using a chatbot is a lot easier than clicking everything together.
I wonder how complex the input for the agents can get. It would be great to create a content type with a pathauto url.
I would keep an AI assistent with structure generation agents out of the production configuration. I also saw there is an AI logging module to debug requests.
Now that I dipped my toes in the AI modules world, I want to explore more.
Source link
lol