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 and category pages
  • Add metadata to product, category and CMS pages
  • Create content for multiple products via mass action
  • Generate texts via Page Builder
  • OpenAI integration

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

Before configuring the extention, you should create and insert the Secret Key for OpenAI Core. 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 go to: Stores → Configutarion → Amasty Extensions → OpenAI Core:

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.

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-3.5-turbo
  • text-davinci-003
  • text-davinci-002
  • text-ada-001
gpt-3.5-turbo is more capable GPT-3.5 model and optimized for chat at 1/10th the cost in comparison with text-davinci-003. You can use the List models API to see all of your available models, or see Model overview for their descriptions.

Temperature - this indicator affects the creativity of the model. The closer this metric is to 1, 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. Here you can specify the maximum number of tokens to generate in the completion.

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. Here you can specify the maximum number of tokens to generate in the completion.

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

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

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 1, 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. Here you can specify the maximum number of tokens to generate in the completion.

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

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

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 1, 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.

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

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

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.

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 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 description 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).

Generate custom description 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. To do this please go to go 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 description with AI and Generate custom description 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.

Product Page Metadata

With the extension you can automatically add Meta Title 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 based on previously selected product attributes.

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

Adding content to Product Pages via Mass Action

With the ChatGPT AI Content Generator extension, you can add short and long descriptions 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 from the dropdown:

  • Short
  • Long
  • Short and Long

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 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 description with AI - click this button to automatically generate the description based on category name.

Generate custom description 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 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 description based on category name.

Advanced generation with AI - click this button to automatically generate the Meta Title / Meta Description 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:

  • Meta Title
  • Meta Description

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 description based on the CMS page name.

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

Frontend examples

Product Page with auto-generated content:

Category Page with auto-generated content:

Find out how to install the Improved Sorting extension for Magento 2 via Composer.

Rate the user guide
 stars  from 1 votes (Details)
magento_2/chatgpt_ai_content_generator.txt · Last modified: 2023/05/04 08:09 by asemenova