Page tree
Skip to end of metadata
Go to start of metadata
The WordAI module is used for rewrite text in your dialogs or apps, WordAi uses advanced machine learning models to provide high quality rewriting that is indistinguishable from human content. One you have the text rewrited, the module provides different options(from 1 to 10) to select one and adapt your input.

JIRAWORDAI
GitWordAI

Installation

Maven is the easiest way to install the module. Add the following dependency to your bundle:

<dependency>
  <groupId>info.magnolia.ai</groupId>
  <artifactId>magnolia-wordai</artifactId>
  <version>${version}</version>
</dependency>

Also, you need to modify the server@defaultBaseUrl to point to your instance.

Versions

1.0-SNAPSHOTMagnolia 6.2

Usage

Configuration

You only need a light module with a decoration to wordai-widget/config.yaml

url:
key:
email:
uniqueness:
rewrites:

The params are the following: 

  • url: Api URL from WordAI
  • key: secret key provided by WordAI
  • email: email registered in WordAI
  • uniqueness: Depend on how conservative vs adventurous you want your rewrite to be, you can set uniqueness as an integer ranging from 1 to 3, where 1 stands for More Conservative, 2 stands for Regular, and 3 stands for More Adventurous. Default is 1.
  • rewrites: The number of rewrites you'd like WordAi to create for your original text. Rewrite must be an integer ranging from 1 to 10. Default is 1.

Include in a dialog:

To include the new field in a dialog, you will need this dialog configuration, where you need to include in your form the implementationClass and the field called description(or the name of your election):

form:
   implementationClass: info.magnolia.ui.javascript.form.FormViewWithChangeListener
   properties:
       description: 
          $type: javascriptField
          fieldScript: /wordai-widget/webresources/wordai/wordai.html
          height: 150
          defaultValue: "#00ff00"


The result will be a text field with a button to rewrite your text before you include it in the page. Once you push the Rewrite button you can select different rewrites to insert one:



Warnings

  • This module is at INCUBATOR level.

Changelog

  • Version 1.0 - Initial release of the extensions version of the module.