Download the PHP package bydn/openai-review-validator without Composer

On this page you can find all versions of the php package bydn/openai-review-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package openai-review-validator

Magento 2 AI Review Validation

This cutting-edge extension, infused with the power of Artificial Intelligence, facilitates automatic validation of product reviews, ensuring that feedback is genuine, relevant, and free from spam or malicious content. By harnessing AI's deep learning capabilities, the extension streamlines the review moderation process.

Features

Instalation

Run:

Dependencies

This extension needs an OpenAI API account and the corresponding API key.

To obtain your API key, go to https://platform.openai.com/ and sign in into your account or create a new one.

Then, go to your profile menu and select View API keys (please note than this menu can change over time):

Create a new API by clicking the button “Create new secret key” and give it a name when asked.

Important: Copy your keys and save it in a secure place as you will not be able to see your key again after.

IMPORTANT: As of the release of this guide, OpenAI is offering the moderation API for free. This means you won't incur any charges from OpenAI for using it. However, this could change in the future. Stay updated by checking OpenAI's pricing page at: https://openai.com/pricing

Configuration

Access the configuration of the base extension going to Stores => Configuration => AI Extensions (by DN). Enable de API usage and paste the API you get on the previous section:

Once you have enabled the OpenAI integration and set your API Key, go to Open AI Review Validator (again inside Stores => Configuration => AI Extensions (by DN)) to configure your Review Validation.

General Section

First, in the General section, configure the behavior of the extension:

OpenAI Review Validator Enabled. Turn this option on to start validating reviews against the OpenAI moderation API.

If this is enabled, the extension will validate Pending Reviews every 15 minutes against OpenAI API, storing the results in the Magento database and showing them in the Reviews section in the backoffice. See below.

Auto validate reviews. Enabling this option, makes the extension to automatically move Pending Reviews into Approval or Rejection status after OpenAI validation.

If this option is turned off, the extension will still validate reviews against OpenAI but the Review will remain in Pending Status until you check the result from OpenAI and change its status manually. Remember that you can always manually change the status of any review, regardless of the automatic validation.

Abusive Language Check Section

In this section you can enable and configure language analysis.

The lower is the threshold score for each category, the softer is the validation.

For example, if you configure 0 for the Sexual Language threshold, that means the strongest validation will be done and no Sexual Language will be allowed at all.

If instead you set 100 for a category, that means that category will not be moderated and any related word or expression that fits that category will be allowed.

We recommend starting with the preconfigured levels and then fine-tune the thresholds for your particular business.

Spam Check Section

In this section you can enable Spam analysis

The threshold acts the same way that explained before. 0 means strongest validation, so less spam expected to be validated. 100 means spam detection would be almost disabled. Recommended starting value is 75.

Unrelated Content Check Section

In this section you can enable an additional validation to know if the review is related to the product being reviewed or at least it seems a product review.

First configuration text is the template that is sent to OpenAI API to ask about the likeness of the text to a product review. You can use a placeholder to include your product name, so the check is more related to the product.

If your products have not a meaningful name (including for example the type of product, like t-shirt, swatch, and so on), better remove the name of the product and make the validation to be generic, as generic names may confuse the AI.

Where to see the collected data

Once you configure the extension, give some time to the extension to start validating pending reviews. Validation takes place every 15 minutes.

Then go to Marketing Reviews => All Reviews and you will start seeing the validation results.

Go into any review to see the validation details:

Having problems

Contact me at soy (at) solodani.com


All versions of openai-review-validator with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
bydn/openai Version >=1.1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bydn/openai-review-validator contains the following files

Loading the files please wait ...