Welcome to the AI Assistant documentation.
Whether you are a new or an advanced user, you can find some useful information here.
Firstly, please, find our extension in My Downloadable Products section of our store. Learn how to install extension, and proceed with Quick Start, which will guide you to set up your AI Assistant service.
php -f bin/magento module:enable Mirasvit_Core Mirasvit_Assistant
to enable the extension.php -f bin/magento setup:upgrade
to install the extension.php -f bin/magento cache:clean
to clean the cache.Deploy static view files
rm -rf pub/static/*; rm -rf var/view_preprocessed/*; php -f bin/magento setup:static-content:deploy
php -f bin/magento module:enable Mirasvit_Core Mirasvit_Assistant
to enable the extension.php -f bin/magento setup:upgrade
to install the extension.php -f bin/magento cache:clean
to clean the cache.Deploy static view files
rm -rf pub/static/*; rm -rf var/view_preprocessed/*; php -f bin/magento setup:static-content:deploy
"app/code/"
directory, you additionally need to install the required libraries through the composer:composer require "liquid/liquid":"~1.4"
AI Assistant integrates your Magento store with GPT3/ChatGPT, allowing you to leverage the latest AI technology advances in your business.
The AI will help you with SEO, customer support, and your blog:
Navigate to Stores > Settings > Configuration > Mirasvit extensions > AI Assistant > General. Paste the API key into the field OpenAI Secret Key in order to use the artificial intellect in your store.
The AI Assistant extension accesses ChatGPT via an API. You need to sign up for a ChatGPT account in order to obtain the OpenAI secret key.
Generate the OpenAI secret API key on page platform.openai.com/account/api-keys. Click Create new secret key and copy the key.
Using ChatGPT API costs money, which are billed from your ChatGPT account. The total pricing depends on the number of tokens generated by this language model. Refer to openai.com/api/pricing/ for more info on prices.
Choose a most suitable language models for you to utilize. AI Assistant works via various language models.
ChatGPT starts generating text in respond to a text prompt. Configure prompts for your store by navigating to System > AI Assistant > Prompts.
Add a new prompt or duplicate an existing one to use it as a template.
Use the variables in the prompt so the ChatGPT could generate a response that includes specific details on your store, blog content, customer.
Variable | Description |
---|---|
{{ global.input }} | Identifier of the input field. |
{{ store.name }} | Store name. |
Helpdesk
Variable | Description |
---|---|
{{ ticket.lastMessage }} | Includes the content of the last |
{{ ticket.customer }} | Customer full name |
{{ user.first_name }} | Agent first name |
{{ user.name }} | Agent name |
{{ user.last_name }} | Agent last name |
Product edit page
Variable | Description |
---|---|
{{ product.name }} | Name of the product |
{{ product.some_attribute }} | One product attribute |
{{ product.attributes }} | List of useful attributes |
Category edit page
Variable | Description |
---|---|
{{ category.some_attribute }} | One product attribute |
{{ category.attributes }} | List of useful attributes |
Blog edit page
Variable | Description |
---|---|
{{ post.title }} | Title of the blog post |
{{ post.content }} | Main content of the blog post |
{{ post.short_content }} | Short content of the blog post |
{{ post.meta_title }} | Meta Title of the blog post |
{{ post.meta_description }} | Meta Description of the blog post |
{{ post.meta_keywords }} | Meta Keywords of the blog post |
{{ post.data }} | Combined data of the blog post |
Field selector | Description |
---|---|
[name="product[meta_title]"] | Meta title on product page |
[name="product[meta_keyword]"] | Meta keyword on product page |
[name="product[meta_description]"] | Meta description on product page |
textarea[name=short_description] | Product short description |
textarea[name=description] | Product description |
textarea[id=reply] | Ticket reply |
[name="name"] | Blog post title |
textarea[name="meta_title"] | Blog post meta title |
textarea[name="meta_keywords"] | Blog post keywords |
textarea[name="meta_description"] | Blog post meta description |
textarea[name="short_content"] | Blog post summary |
OpenAI language model can be used for translating text to another language. You need to create a corresponding propmpt in AI Assistant to use ChatGPT for translating purposes.
There are several approaches to create a prompt for ChatGPT to be used as a translator:
When using Automation rules functionality, the language of the ChatGPT output is affected by the selected Store view. The Store View language will signal to ChatGPT to switch the language for its output.
Code | meta_title |
Title | Meta Title |
Prompt |
Write a meta title on the following product information: {{ global.input }} Product attributes: {{ product.attributes }} |
Scopes | Product |
Field Selectors | [name="product[meta_title]"] |
Help Text | unique selling point |
Convert output to HTML | No |
Code | meta_keywords |
Title | Meta Keywords |
Prompt |
Write a meta keywords on the following product information: {{ global.input }} Product attributes: {{ product.attributes }} |
Scopes | Product |
Field Selectors | [name="product[meta_keyword]"] |
Help Text | unique selling point |
Convert output to HTML | No |
Code | meta_description |
Title | Meta Description |
Prompt |
Write a meta description on the following product information: {{ global.input }} Product attributes: {{ product.attributes }} |
Scopes | Product |
Field Selectors | [name="product[meta_description]"] |
Help Text | - unique selling point 1 - unique selling point 2 - unique selling point 3 |
Convert output to HTML | No |
Code | description |
Title | Description |
Prompt |
Write a long marketing product description by the plan: - Introduction (don't print this as a header) - Benefits - Key features - Feature - Feature - Feature - Feature - Feature - Summary Use the following product information: {{ global.input }} Product attributes: {{ product.attributes }} |
Scopes | Product |
Field Selectors | textarea[name=description] |
Help Text | - unique selling point 1 - unique selling point 2 - unique selling point 3 |
Convert output to HTML | Yes |
Short description is a block of text with all the major info on a product. This block is displayed when the product is displayed beyond its product page.
Code | short_description |
Title | Short Description |
Prompt |
Write a short marketing product description using the following product information: {{ global.input }} Product attributes: {{ product.attributes }} |
Scopes | Product |
Field Selectors | textarea[name=short_description] |
Help Text | - unique selling point 1 - unique selling point 2 - unique selling point 3 |
Convert output to HTML | No |
Code | ticket |
Title | Message |
Prompt |
Customer Name: {{ ticket.customer }} There is a last message from customer: ``` {{ticket.lastMessage}} ``` Write a personal message that explain next things: ``` {{ global.input }} ``` Message: |
Scopes | Ticket |
Field Selectors | textarea[id=reply] |
Help Text | - key point 1 - key point 2 - key point 3 |
Convert output to HTML | No |
Code | friendly |
Title | Friendly |
Prompt |
Make the following message more sociable and friendly: ``` {{ global.input }} ``` Message: |
Scopes | Ticket |
Field Selectors | textarea[id=reply] |
Help Text | N/A |
Convert output to HTML | No |
Code | grammar |
Title | Fix Grammar |
Prompt |
Fix grammar in the following message. Keep all original line breaks. ``` {{ global.input }} ``` Message: |
Scopes | Ticket |
Field Selectors | textarea[id=reply] |
Help Text | N/A |
Convert output to HTML | No |
Code | blog_post_title |
Title | Title |
Prompt |
There is a blog post: ``` {{ post.content }} ``` Write a title: |
Scopes | Blog post |
Field Selectors | [name="name"] |
Help Text | N/A |
Convert output to HTML | No |
Code | blog_post_meta_title |
Title | Meta Title |
Prompt |
There is a blog post: ``` {{ post.title }} {{ post.content }} ``` Write a meta title: |
Scopes | Blog post |
Field Selectors | textarea[name="meta_title"] |
Help Text | N/A |
Convert output to HTML | No |
Code | blog_post_meta_keywords |
Title | Meta Keywords |
Prompt |
There is a blog post: ``` {{ post.title }} {{ post.content }} ``` Write meta keywords: |
Scopes | Blog post |
Field Selectors | textarea[name="meta_keywords"] |
Help Text | N/A |
Convert output to HTML | No |
Code | blog_post_meta_description |
Title | Meta Description |
Prompt |
There is a blog post: ``` {{ post.title }} {{ post.content }} ``` Write a meta description: |
Scopes | Blog post |
Field Selectors | textarea[name="meta_description"] |
Help Text | N/A |
Convert output to HTML | No |
Code | blog_post_summary |
Title | Summary |
Prompt |
There is a blog post: ``` {{ post.title }} {{ post.content }} ``` Write a summary: |
Scopes | Blog post |
Field Selectors | textarea[name="short_content"] |
Help Text | N/A |
Convert output to HTML | No |
Code | translate_blog |
Title | Translate blog article |
Prompt |
Translate the following blog post from English to German. Keep all original line breaks. ``` {{ post.content }} ``` Post: |
Scopes | Blog |
Field Selectors | .blog-post-edit textarea[name="html"], .blog-post-edit textarea[name="content"] |
Help Text | Translate the following blog post from English to German. |
Convert output to HTML | Yes |
Automation rules functionality allows to run the selected prompts by Cron.
Navigate to System > AI Assistant > Automation rules and add a new rule.
Automation rule configurations are split in 2 stages.
On the first stage you'll need to set the following information for the rule (General Information section):
After specifying all data press the Save and Continue button to proceed to the second stage.
You won't be able to change the entity type after you saved the rule.
On the second stage you'll need to set additional information:
After specifying all data save the rule.
Write down its ID as it will be used for configuring Cron job.
You will need to specify the rule ID in Cron command bin/magento mirasvit:assistant:apply-rule --id XXX
, where XXX is the rule ID number.
For more details regarding this command check the Command Line Interface section of this manual.
The GPT/ChatGPT will generate answers on the language depending on the selected Store View.
Usage: php -f bin/magento [options]
mirasvit:assistant:apply-rule
- Apply automation rule for products that match rule's conditions. This command has the following params:
--id
- id of applied rule. This parametr is required.--entity-id
- allows you to specify only one entity id (e.g. product_id) that will be changed by the rule. This parameter is optional.--reset
- reset already applied rule so it can be re-applied again later. Will affect only rules with "Apply Only Once" => "Yes". This parameter can be combined with the parameter --entity-id
. Not applicable along with the --dry-run
parameter.--dry-run
- this is a flag which indicates that you would like to run the command without changing anything in database.--force
- forcibly apply rule (will terminate previous process for current rule if running).mirasvit:assistant:apply-rule --id 1
- applies the rule with ID 1 to all products that match conditions in the rulemirasvit:assistant:apply-rule --id 1 --entity_id 10
- applies the rule with ID 1 to the entity (e.g. product) with ID 10 ONLY if that product matches conditions of the rulemirasvit:assistant:apply-rule --id 1 --reset
- resets the rule with ID 1 ONLY if the rule's option "Apply Only Once" is set to "Yes"
mirasvit:assistant:reindex
- Reindexes the "automation rule - product" relations. This command has only one optional parameter --reset
which can be used to remove all data from the "automation rule - product" relations tableTo upgrade the extension, follow these steps:
composer require mirasvit/module-assistant:* --update-with-dependencies
to update current extension with all dependencies.
composer update mirasvit/*
command. It will update all Mirasvit modules installed in your store. php -f bin/magento setup:upgrade
to install updates.php -f bin/magento cache:clean
to clean the cache.Deploy static view files
rm -rf pub/static/*; rm -rf var/view_preprocessed/*; php -f bin/magento setup:static-content:deploy
To temporarily disable the extension please follow these steps:
php -f bin/magento module:disable Mirasvit_Assistant
to disable the extension.To uninstall the extension, please follow these steps:
php -f bin/magento module:disable Mirasvit_Assistant
to disable the extension.composer remove mirasvit/module-assistant
to remove the extension.(2024-10-30)
(2024-08-09)
(2024-07-30)
(2024-07-25)
(2024-07-24)
(2024-07-22)
(2024-07-04)
(2024-06-26)
(2024-05-24)
(2024-05-14)
(2024-05-07)
(2024-04-30)
(2024-03-11)
(2024-02-27)
(2023-12-29)
(2023-10-30)
(2023-10-27)
(2023-10-18)
(2023-10-05)
(2023-09-28)
(2023-09-25)
(2023-09-08)
(2023-08-28)
(2023-08-25)
(2023-08-25)
(2023-07-26)
(2023-07-04)
(2023-07-03)
(2023-06-08)
(2023-06-05)
(2023-05-31)
(2023-05-16)
(2023-04-27)
(2023-04-25)
(2023-04-21)
(2023-04-20)
(2023-04-18)
(2023-04-17)
(2023-04-13)
(2023-04-11)
(2023-04-05)
(2023-03-28)
(2023-03-22)
(2023-03-21)
(2023-03-20)
(2023-03-17)
(2023-03-15)
(2023-03-06)
(2023-02-22)