Transform Content and Image Automation with Power of Liferay & Ai

blog-banner

In the fast-evolving world, keeping content fresh and engaging is more difficult than ever. Recognizing this need, Liferay has introduced new features that use artificial intelligence (AI) to generate content and images. Here we explore these new features.

AI-Powered Content Generation in Liferay

Liferay's web content and Documents Media applications are now seamlessly integrated with OpenAI's ChatGPT, enhancing Liferay automation. By providing an OpenAI API key for your instance or site, you can access AI directly from the Web Content editor or Documents and Media application. This integration allows you to easily generate content and images with a few clicks, simplifying the content management with Liferay and improving efficiency, while further enhancing Liferay capabilities.

Benefits of AI Integration in Liferay

  • Efficiency: Automating content and image creation drastically reduces the time and effort required, allowing teams to focus on strategic tasks.
  • Scalability: The ability to quickly generate large volumes of content and visuals supports scaling content marketing efforts without additional resources.
  • Cost-effectiveness: Reducing reliance on external content and design services can lead to significant cost savings.

What are the prerequisites?

  • Minimum Requirement to Generate Content Using AI

    • Liferay DXP version 2023.Q4+
    • Liferay Portal version 7.4 GA98+
  • Minimum Requirement to Generate Images Using AI

    • Liferay DXP version 2024.Q2+
    • Liferay Portal version 7.4 GA120+

Liferay Implementation with AI

Liferay currently offers two key AI-powered features:

  • Use AI to generate content
  • Use AI to generate images

Note: To work with Liferay AI, you need an API key. You can generate this key by visiting OpenAI's API Key page. Once generated, you can use this key in Liferay to enable AI functionalities. You can integrate it into a Liferay instance via Instance Settings or apply it to a specific site.

Generating Text Content Using AI

Configuration of an Open API Key for Liferay Instance

To Generate the Content using AI in Liferay first add an API key to a Liferay Instance.

  • In the Global Menu -> Control Panel tab. Click on Instance Settings under Configuration tab.
  • Here locate and click on AI Creator under the Content and Data. This is where you can set up and manage AI-related configurations.
  • In the AI Creator settings, find the API Key field. Paste your OpenAI API key into this field to integrate Liferay with AI services.
  • Ensure that the "Enable ChatGPT to Create Content" option is selected. If it is not already enabled, check the box to activate this feature. These settings enable content generation in Liferay using AI. If you choose to disable this option, it will stop content generation feature with AI in Liferay and the AI Creator button will not show in the Web Content editor.

Add an API Key to a Specific Site

By configuring an API key at the site level, you can utilize distinct keys for each site or deactivate a key for a particular site.

  • Open the Product Menu by clicking on the Product Menu icon.
  • Navigate to Configuration and select Site Settings.
  • Under Content and Data, click on AI Creator.
  • Add OpenAI Key in API Key field.
  • You can toggle the "Enable ChatGPT to Create Content" option for the enable or disable the feature for specific site.
  • Click Save to apply the changes.

Use the AI Creator Tool to Create Text in Web Content

  • Open the Global Menu using the Global Menu icon and choose your site from the right-hand panel.
  • Open the Product Menu -> Web Content -> Content & Data.
  • Click the Add button using Add icon to create a new Basic Web Content article.
  • Select AI Creator.

AI Creator In Basic Web Content

 

  • Fill in these three magical fields, In the AI Creator window:
    • Description: Describe your desired content.
    • Tone: Choose the tone for your text. You can select from five delightful options: Neutral, Casual, Friendly, Formal, and Academic.
    • Word Count: Add an approximate word count.

AI Creator.

  • Once you've sprinkled your details in, click Create.
  • (Optional) If the AI's creation doesn’t quite meet your expectations, hit Try Again for another round of content magic.
  • Finally, click Add to insert the enchanting content into your web content article.

Generating Images Using AI

Note: If this feature isn’t available in your version, you can activate it by enabling the feature flag in Liferay.

Configuration of an Open API Key for Liferay Instance

First add an API key to a Liferay Instance, To Generate the Image using AI in Liferay.

  • Go to Global Menu -> Control Panel -> Instance Settings.
  • Now select AI Creator under the Content and Data.
  • Add the API Key if it’s not added.
  • Make sure the option to "Enable DALL-E to Create Images" is checked. If it is not already enabled, check the box to activate this feature. These settings enable image generation in Liferay using AI. If you choose to disable this option, it will stop the image generation feature with AI in Liferay and the Create AI Image button will not be visible when adding a new document.

Add an API Key to a Specific Site

By configuring an API key at the site level, you can utilize distinct keys for each site or deactivate a key for a particular site.

  • Go to the Product Menu -> Configuration -> Site Settings.
  • Under Content and Data, click on AI Creator.
  • Enter your OpenAI API key into the designated API Key field, if it’s not added.
  • You can toggle the "Enable DALL-E to Create Images" option for the enable or disable the feature for specific site.
  • Click Save to apply the changes.

Use AI Creator Tool to Create Visuals in Documents and Media

  • Open the Global Menu using the Global Menu icon and choose your site from the right-hand panel.
  • Open the Product Menu by clicking on the Product Menu icon.
  • Click on Documents and Media -> Content & Data.
  • Click the New and select Create AI Image button.
  • Fill in these three magical fields, In the Create AI Image Window:
    • Description: Describe the vision or theme you want the AI to generate.
    • Image Size: Choose the size of images: 256x256, 512x512, or 1024x1024.
    • Number of Images to Generate: Decide how many images you need, up to four per request.

Create AI Image

  • Once you've added your details in, click Create.
  • (Optional) If the AI's creation doesn’t quite meet your expectations, hit Try Again for another round of content magic.
  • Finally, click Add Selected to insert the enchanting images into your Documents and Media.

Conclusion

By following these steps, you can effectively integrate Liferay with AI to generate content and images. Automating these critical processes enables businesses to enhance efficiency, maintain consistency, and scale their digital presence more effectively. Liferay's AI-powered features, combined with expert development services, offer a compelling solution for the modern digital landscape. Embrace the future of content and image automation with Liferay development and stay ahead in the competitive digital world.

Contact us

For Your Business Requirements

Text to Identify Refresh CAPTCHA
Background Image Close Button

2 - 4 October 2024

Hall: 10, Booth: #B8 Brussels, Belgium