User Tools

Site Tools


Sidebar

magento_2:chatgpt_ai_content_generator

For more details see how the AI Content Generator for Magento 2 extension works.

Guide for ChatGPT AI Content Generator for Magento 2

The AI Content Generator extension is a lightweight solution that helps store owners to maximize their productivity and save a huge amount of time by automatically generating compelling descriptions and metadata for their online store pages.

  • Generate content for product, category and CMS pages
  • Add metadata to product, category and CMS pages
  • Create content for multiple products via mass action
  • Add meta data to multiple CMS pages via mass action
  • Generate texts via Page Builder
  • Generate content on any language
  • Generate various content for each store view
  • Compatibility with Blog Pro
  • Generate email and newsletter templates (PRO verion)
  • Supports GPT-3, GPT-4, GPT-4o and GPT-4 Turbo

General Settings

To configure the ChatGPT AI Content Generator extension on your Magento 2 instance, start by adjusting the General Settings.

The extension consists of two modules:

  • OpenAI Core, which is responsible for communication with the OpenAI API service (serves as a system module, and
  • AI Content Generator itself

First, please navigate to Stores → Configutarion → Amasty Extensions → OpenAI Core to adjust content generation provider settings.

Content Generation Provider - here you can choose one of the content generation providers: you can use your own OpenAI key or utilize the Amasty AI Service for content generation.

Please be aware that at present, the Amasty AI Service exclusively offers the GPT-3.5 model for content generation. As our service is in beta, all content generations are complimentary for you until October 2024.

If you prefer selecting the Amasty AI Service as your content generation provider, simply enable this option and save your configuration.

If you prefer to use your own OpenAI key, ensure to create and insert the Secret Key for OpenAI Core before configuring the extension. To do this, please create an account at OpenAI platform, than go to View API Keys and click Create new secret key.

As soon you get the key, come back to your Magento admin panel and insert the Secret Key you've created to allow the extension using OpenAI API.

Now let's proceed with AI Content Generator general settings. Please go to: Stores → Configutarion → Amasty Extensions → AI Content Generator:

Enable Module - set to 'Yes' to enable the module.

Language - by default ChatGPT generates a response in the language of the selected store view locale, but you can choose another language from the dropdown.

With the extension, you can generate different content for each store view. To do this, select the desired store view from the top right corner of the product or CMS pages grid, or choose the required store view while editing a particular page (product, category, CMS), depending on your needs. Generate the content and save the page. The content will then be displayed for the chosen store view.

Product Settings

The module allows you to specify which fields should be filled with content generated through OpenAPI and to flexibly customize the criteria that participate in the generation.

Content Based on Selected Product Attributes - here you can multi-select the attributes on which the product description will be based. The limit is 1000 attributes.

Content Based on Custom Attributes - Use this setting when the desired attribute is not found in the 'Content Based on Selected Product Attributes' option. Simply enter the attribute codes you need, separated by space.

Model Name - choose the model that will perform content generation.

For now the following models are available within the module:

  • gpt-4
  • gpt-4o
  • gpt-4-turbo
  • gpt-3.5-turbo
  • text-davinci-003 (Deprecated)
  • text-davinci-002 (Deprecated)
  • text-ada-001 (Deprecated)
You can use the List models API to see all of your available models, or see Model overview for their descriptions.
Please note: OpenAI stopped the support for the older models text-ada-001, text-davinci-002, text-davinci-003 and recommends using gpt-3.5-turbo instead of them. These deprecated models will be phased out from the AI ChatGPT Content Generator extension in the nearest releases.

Temperature - this indicator affects the creativity of the model. The closer this metric is to 2, the more random the responses to requested actions will be. The closer the metric is to 0, the less creative the model's suggestions will be.

Suffix - a string of characters that is added to the end of the prompt input before generating a response. It is an optional parameter that can be used to provide additional context or constraints to the model during the generation process.

Short Description Maximum Tokens - the setting for OpenAI which is used for the content generation for short descriptions. The maximum number of tokens to generate in the completion. Here you can specify the number from 1 to 3100. If model text-ada-001 is used, it is possible to use up to 2000 tokens.

In OpenAI, tokens are the basic units of text used in language models. They are individual words or pieces of words (subwords) that are given a unique numerical representation. Language models use these numerical representations of tokens to process and generate text. In other words, when you input text into a language model, it breaks it down into tokens, which it then analyzes and uses to produce a response. The process of breaking text into tokens is called tokenization.

Description Maximum Tokens - the setting for OpenAI which is used for the content generation for descriptions. The maximum number of tokens to generate in the completion. Here you can specify the number from 1 to 3900. If model text-ada-001 is used, it is possible to use up to 2000 tokens.

Meta Title Maximum Tokens - the setting for OpenAI which is used for the content generation for meta titles. The maximum number of tokens to generate in the completion. Here you can specify the the number from 1 to 256.

Meta Keywords Maximum Tokens - the setting for OpenAI which is used for the content generation for meta keywords. The maximum number of tokens to generate in the completion. Here you can specify the the number from 1 to 256.

Meta Description Maximum Tokens - the setting for OpenAI which is used for the content generation for meta descriptions. The maximum number of tokens to generate in the completion. Here you can specify the number from 1 to 1024.

Replace the Empty Image Tag With a Product Image - sometimes, AI generates a description with an empty img tag. If the setting is enabled, the empty img tag will be replaced with the product image.

Image Width - here you can specify the width, that will be used for the image, if the setting 'Replace the Empty Image Tag With a Product Image' is enabled.

Remove the Image Tag - in cases, when AI generates a description with an empty img tag, you can not only replace it with the product image, but also remove the tag. It will be automatically removed if this setting is set to 'Yes'.

Remove the Title - set to 'Yes' to remove the title from the product description. Usually AI uses the product name as the title.

Stop - the setting for OpenAI which specifies a sequence of tokens that should not be exceeded in the generated text. It used to control the length of the generated text and prevent the model from generating excessively long responses. When the model encounters a “stop” token, it will stop generating text and return the output generated so far.

Fill in Short Description on Product Save if Empty - if this setting is enabled, a process to fill in the Short Description will be launched in the background when the product is saved. The Short Description will be filled in only if the product did not have it before. Typically, the process takes several seconds.

Fill in Description on Product Save if Empty - if this setting is enabled, a process to fill in the Description will be launched in the background when the product is saved. The Description will be filled in only if the product did not have it before. Typically, the process takes several seconds.

Strings to Exclude - specify a list of words entered with a space, that should not be included in the generated content.

Category Settings

Model Name - choose the model that will perform content generation. Find more information about the models in the Product Settings section of this guide.

Temperature - this indicator affects the creativity of the model. The closer this metric is to 2, the more random the responses to requested actions will be. The closer the metric is to 0, the less creative the model's suggestions will be.

Suffix - a string of characters that is added to the end of the prompt input before generating a response. It is an optional parameter that can be used to provide additional context or constraints to the model during the generation process.

Description Maximum Tokens - the setting for OpenAI which is used for the content generation for descriptions. The maximum number of tokens to generate in the completion. Here you can specify the number from 1 to 3900. If model text-ada-001 is used, it is possible to use up to 2000 tokens.

Meta Title Maximum Tokens - the setting for OpenAI which is used for the content generation for meta titles. The maximum number of tokens to generate in the completion. Here you can specify the the number from 1 to 256.

Meta Keywords Maximum Tokens - the setting for OpenAI which is used for the content generation for meta keywords. The maximum number of tokens to generate in the completion. Here you can specify the the number from 1 to 256

Meta Description Maximum Tokens - the setting for OpenAI which is used for the content generation for meta descriptions. The maximum number of tokens to generate in the completion. Here you can specify the number from 1 to 1024.

Stop - the setting for OpenAI which specifies a sequence of tokens that should not be exceeded in the generated text. It used to control the length of the generated text and prevent the model from generating excessively long responses. When the model encounters a “stop” token, it will stop generating text and return the output generated so far.

CMS Pages Settings

Model Name - choose the model that will perform content generation. Find more information about the models in the Product Settings section of this guide.

Temperature - this indicator affects the creativity of the model. The closer this metric is to 2, the more random the responses to requested actions will be. The closer the metric is to 0, the less creative the model's suggestions will be.

Suffix - a string of characters that is added to the end of the prompt input before generating a response. It is an optional parameter that can be used to provide additional context or constraints to the model during the generation process.

Description Maximum Tokens - the setting for OpenAI which is used for the content generation for descriptions. The maximum number of tokens to generate in the completion. Here you can specify the number from 1 to 3900. If model text-ada-001 is used, it is possible to use up to 2000 tokens.

Meta Title Maximum Tokens - the setting for OpenAI which is used for the content generation for meta titles. The maximum number of tokens to generate in the completion. Here you can specify the the number from 1 to 256.

Meta Keywords Maximum Tokens - the setting for OpenAI which is used for the content generation for meta keywords. The maximum number of tokens to generate in the completion. Here you can specify the the number from 1 to 256.

Meta Description Maximum Tokens - the setting for OpenAI which is used for the content generation for meta descriptions. The maximum number of tokens to generate in the completion. Here you can specify the number from 1 to 1024.

Stop - the setting for OpenAI which specifies a sequence of tokens that should not be exceeded in the generated text. It used to control the length of the generated text and prevent the model from generating excessively long responses. When the model encounters a “stop” token, it will stop generating text and return the output generated so far.

[Pro] Email Templates Settings

This functionality is available within ChatGPT AI Content Generator Pro.

Model Name - choose the model that will perform content generation. Find more information about the models in the Product Settings section of this guide.

Temperature - this indicator affects the creativity of the model. The closer this metric is to 2, the more random the responses to requested actions will be. The closer the metric is to 0, the less creative the model's suggestions will be.

Suffix - a string of characters that is added to the end of the prompt input before generating a response. It is an optional parameter that can be used to provide additional context or constraints to the model during the generation process.

Template Subject Maximum Tokens - the setting for OpenAI which is used for the content generation for email template subject. The maximum number of tokens to generate in the completion. Here you can specify the the number from 1 to 256.

Template Content Maximum Tokens - the setting for OpenAI which is used for the content generation for email template content. The maximum number of tokens to generate in the completion. Here you can specify the the number from 1 to 3900.

Stop - the setting for OpenAI which specifies a sequence of tokens that should not be exceeded in the generated text. It used to control the length of the generated text and prevent the model from generating excessively long responses. When the model encounters a “stop” token, it will stop generating text and return the output generated so far.

Strings to Exclude - specify a list of words entered with a space, that should not be included in the generated content.

[Pro] Newsletter Templates Settings

This functionality is available within ChatGPT AI Content Generator Pro.

Model Name - choose the model that will perform content generation. Find more information about the models in the Product Settings section of this guide.

Temperature - this indicator affects the creativity of the model. The closer this metric is to 2, the more random the responses to requested actions will be. The closer the metric is to 0, the less creative the model's suggestions will be.

Suffix - a string of characters that is added to the end of the prompt input before generating a response. It is an optional parameter that can be used to provide additional context or constraints to the model during the generation process.

Template Subject Maximum Tokens - the setting for OpenAI which is used for the content generation for newsletter template subject. The maximum number of tokens to generate in the completion. Here you can specify the the number from 1 to 256.

Template Content Maximum Tokens - the setting for OpenAI which is used for the content generation for newsletter template content. The maximum number of tokens to generate in the completion. Here you can specify the the number from 1 to 3900.

Stop - the setting for OpenAI which specifies a sequence of tokens that should not be exceeded in the generated text. It used to control the length of the generated text and prevent the model from generating excessively long responses. When the model encounters a “stop” token, it will stop generating text and return the output generated so far.

Strings to Exclude - specify a list of words entered with a space, that should not be included in the generated content.

Generate Content for Product Pages

With the ChatGPT AI Content Generator for Magento 2 you can automatically generate the following data for Product Pages:

  • Short Description
  • Description
  • Meta Title
  • Meta Keywords
  • Meta Description

Product Page Short Description

To generate the short description for the product page please go to Catalog → Products → Needed product → Content section → Short Description:

Generate with AI - click this button to automatically generate the short description for the product, based on previuosly selected product attributes (check here how to select the needed attributes).

The description will generate instantly when more than 4 attributes are completed for the product. If you've filled in 4 or fewer attributes, a pop-up message will appear, giving you the option to proceed or enhance your product description by adding more attributes. If none of the product attributes are filled in, a pop-up will guide you to fill in the attributes before proceeding.

Advanced Generation with AI - click this button to add an input or prompt for the automatic creation of custom product description. You can input a specific topic or idea and the AI will generate relevant content based on that input. This is a more flexible option for content generation compared to relying solely on product attributes.

You can use the generated descriptions as they are or flexibly customize them according to your needs.

Product Page Description

With the AI Content Generator extension you can automatically generate product page description using Page Builder. This functionality is available for HTML element and Text element. To generate product page description via Page Builder please head to Catalog → Products → Needed product → Content section → Description and click the button 'Edit with Page Builder':

Then hover the text and click on the gear icon:

Here you can see the buttons Generate with AI and Advanced Generation with AI and also generate the content based on particular product attributes or based on custom prompt, as it was described above.

Don't forget to click 'Save' on Page Builder editing page, when the content is generated and you've made the necessary corrections if any.

Now, you can generate descriptions not only while editing existing products, but also while adding new products on product creation pages. As soon as automatic generation draws data from the product creation (or product editing) page, you should fill in not fewer than 4 product attributes in order to generate high quality and relevant content.

Product Page Metadata

With the extension you can automatically add Meta Title, Meta Keywords and Meta Description to your product pages, to make your store pages more visible to search engines and therefore to customers. To do this please go to Catalog → Products → Needed product → Search Engine Optimization.

Generate with AI - click this button to generate the Meta Title / Meta Description description / Meta Keywords based on previously selected product attributes.

Advanced generation with AI - click this button to automatically generate the Meta Title / Meta Description / Meta Keywords based on custom input.

Adding content to Product Pages via Mass Action

With the ChatGPT AI Content Generator extension, you can add content to multiple product pages at once using the mass action. Navigate to Catalog → Products, then select the products you need and choose the appropriate action:

  • Short Description
  • Long Description
  • Short and Long Description

Within the ChatGPT AI Content Generator PRO version you can also generate the following Meta data for multiple product pages via mass action:

  • Meta Title
  • Meta Keywords
  • Meta Description

In the PRO version of the extension, once you've selected the desired products, you can opt for one or several actions from the modal window:

The duration of the content generation process depends on the number of products selected for the mass action. However, you can track the process's status through a progress bar that appears as soon as the process starts.

Generate content for Category Pages

With the extension, you can automatically generate the following data for Category Pages:

  • Description
  • Meta Title
  • Meta Keywords
  • Meta Description

Category Page Description

With the AI Content Generator extension you can automatically generate category page description using Page Builder. To do this please go to go to Catalog → Categories → Needed category → Content section → Description and click the button 'Edit with Page Builder':

Then hover the text and click on the gear icon:

Generate with AI - click this button to automatically generate the description based on category name.

Advanced Generation with AI - click this button to automatically generate the description based on custom input, as it was described in the product content section of this guide.

Don't forget to click 'Save' on Page Builder editing page, when the content is generated and you've made the necessary corrections if any.

Category Page Metadata

With the extension you can automatically add Meta Title, Meta Keywords and Meta Description to your category pages, to make your store pages more visible to search engines and therefore to customers. To do this please go to Catalog → Categories → Needed category → Search Engine Optimization.

Generate with AI - click this button to generate the Meta Title / Meta Description / Meta Keywords based on category name.

Advanced generation with AI - click this button to automatically generate the Meta Title / Meta Description / Meta Keywords based on custom input.

Generate content for CMS Pages

As for now, with the extension, you can automatically generate the following data for your CMS Pages:

  • Description
  • Meta Title
  • Meta Keywords
  • Meta Description

CMS Page Description

With the AI Content Generator extension you can automatically generate CMS pages description using Page Builder. To do this, please go to Content → Pages → Needed page → Content section → Description and click the button 'Edit with Page Builder':

Then hover the text and click on the gear icon:

You can automatically generate descriptions using either HTML or Text elements.

Generate with AI - click this button to automatically generate the description based on CMS page name. This option becomes available when editing existing CMS pages.

Advanced Generation with AI - click this button to automatically generate the CMS page description based on custom input. This option is available for existing CMS pages as well as for cases when you are creating new CMS pages.

Don't forget to click 'Save' on Page Builder editing page, when the content is generated and you've made the necessary corrections if any.

CMS Pages Metadata

With the extension you can automatically add Meta Title and Meta Description to your CMS pages, to make your store pages more visible to search engines and therefore to customers. To do this please go to Catalog → Content → Needed CMS Page → Search Engine Optimization.

Generate with AI - click this button to generate the Meta Title / Meta Description / Meta Keywords description based on the CMS page name.

Advanced generation with AI - click this button to automatically generate the Meta Title / Meta Description / Meta Keywords based on your custom input.

Adding content to CMS Pages via Mass Action

With the ChatGPT AI Content Generator extension, you can add SEO data to multiple CMS pages at once using mass action. Navigate to Content → Pages, then select the pages you need and choose the appropriate actions in the modal window (you can choose one or several actions simultaneously):

  • Meta Title
  • Meta Keywords
  • Meta Description

The duration of the content generation process depends on the number of pages selected for the mass action. However, you can track the process's status through a progress bar that appears as soon as the process starts.

[Pro] Generate Email Templates

This functionality is available within ChatGPT AI Content Generator Pro.

To automatically generate Email templates, please navigate to Marketing → Communication → Email Templates.

With the extension you can generate:

Generate with AI - click this button to generate the Template Content based on the Template Name.

Advanced generation with AI - click this button to automatically generate the Template Subject / Template Content based on your custom input.

[Pro] Generate Newsletter Templates

This functionality is available within ChatGPT AI Content Generator Pro.

To automatically generate Newsletter templates, please navigate to Marketing → Communication → Newsletter Templates.

With the extension you can generate:

Generate with AI - click this button to generate the Template Content based on the Template Name.

Advanced generation with AI - click this button to automatically generate the Template Subject / Template Content based on your custom input.

Generate content for Blog

The extension is compatible with Amasty Blog Pro (the compatibility is available as a part of an active Blog Pro product subscription or support subscription). This means that if you have both extensions installed, you can automatically generate Blog Posts content using AI Content Generator.

This functionality is available if you have both extensions installed: Blog Pro for Magento 2 and ChatGPT AI Content Generator for Magento 2.

To adjust Blog content generation general settings please head to Stores → Configuration → Amasty Extensions → AI Content Generator → Blog Posts Settings:

Fill in the settings the same way as it was described above for Product, Category and CMS pages.

Then you can proceed to any Post page and generate the content you need. With the ChatGPT AI Content Generator for Magento 2 you can automatically generate the following types of content for Blog Post pages:

  • Title

  • Short Content
  • Tags

  • Full Content
  • Meta Title
  • Meta Keywords
  • Meta Description

Frontend examples

Product Page with auto-generated content:

Category Page with auto-generated content:

Troubleshooting

Openai internal error

Problem:

The following error appears during descripton generation:

Solution:

  • Temperature Setting: Adjust the temperature setting to a value below 1.5. The error occurs when the setting is equal to or greater than 1.5. Higher values cause OpenAI to process requests for extended periods, potentially leading to server interruptions before receiving a response.
  • Maximum Tokens: Reduce the maximum tokens value.

Additional packages (provided in composer suggestions)

To make additional functionality available, please install the suggested packages you may need.

For Basic and Pro versions:

  • amasty/module-ai-blog-pro-content-generator - Install this package to ensure compatibility with Amasty Blog Pro.

For Pro tariff plan only:

  • amasty/module-ai-mass-actions-content-generator - Install this package to use the mass SEO field content generation functionality for product pages.
Find out how to install the ChatGPT AI Content Generator extension for Magento 2 via Composer.

Rate the user guide
 stars  from 1 votes (Details)
magento_2/chatgpt_ai_content_generator.txt · Last modified: 2024/09/27 08:13 by kkondrateva