WordPress Glossary Plugin (CMTG) - Integrations - ChatGPT
Adding Content Generated by GPT to the Glossary
This feature is available only in the Ecommerce edition since the version 4.2.0 of the WordPress Glossary plugin.
TIP: Try our Live Demo in action.
Introduction
The plugin allows to automatically generate definitions for glossary terms using ChatGPT.
ChatGPT is an artificial intelligence program created by OpenAI that is capable of understanding human language and can have a conversation with people just like another human being. It works by using complex algorithms and deep learning models to analyze and understand the meaning of words and sentences.
ChatGPT processes text using tokens. Tokens are pieces of words used for natural language processing. For English text, 1 token equals about 4 characters or 0.75 words. Learn more how Tokens work. Every time the plugin request the term definition, it spends tokens which are paid. When you register your account, OpenAI gives a start credit which you can spend. When your credit is run out, you can pay to continue using the service. You can check the Pricing Plans.
Read more about possibilities of ChatGPT in our article: Integrating ChatGPT With Tooltip Plugin For WordPress
Front-end Example
Example of the ChatGPT definition generated for empty term:
Example of displaying ChatGPT definition together with manually added definition:
Enabling ChatGPT in the Plugin Settings
To find the settings of the integration, navigate to Admin Dashboard → CM Tooltip Glossary Ecommerce → Settings → Ecommerce Settings tab.
Scroll down and find the section Chat GPT. It has the following options:
- Enabled - Enable the feature to automatically generate term definitions using ChatGPT.
- Chat GPT API Key - In order to make the feature work, you need to enter OpenAI API. It can be obtained on OpenAI site. It's simple - head to the site, sign up and follow the instructions.
- Chat GPT Prompt Template - Specify the request which the plugin will be sending to ChatGPT for getting the term definition. Important: this template must contain the placeholder {term}.
- Chat GPT AI Role - Here you can define the role for the Chat GPT assistant to make your term definitions more specialized. This way, if you define the assistant as an expert in some certain area, it will generate the definitions related to your main topic. Note: this option was introduced in version 4.2.3.
Chat GPT Model - This option allows you to choose a ChatGPT model. This option is inactive until you enter your API key in the option above and save the changes. Once it's done, you will be able to choose any model supported by your API in the dropdown. Note: this option was updated in version 4.3.8.
- Chat GPT Reply Length - Define the maximum length of the reply from ChatGPT. This affects the final length of the term.
- Chat GPT Temperature - This option allows to define how accurate the generated definition will be. This value ranges from 0 to 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. Note: this option was introduced in version 4.2.3.
- Only show Chat GPT when content is empty - Enable it, if you want the definition generated by ChatGPT to be added only in case if the term is empty (when you didn't add the definition manually). If the option is disabled, the ChatGPT definition will be displayed below the definition which you wrote by yourself.
Display button to generate description by Chat GPT on the term page - If enabled, a button for generating a temporary ChatGPT definition will be displayed on each term page on the front-end. The generated definition will be stored in cache until it's cleared or until the button is clicked again while the definition is already displayed - in this case, the definition will be regenerated. This button can be disabled specifically for each term in the metabox CM Tooltip - Term Properties. Note: this option was introduced in version 4.3.8.
Show Chat GPT data in Tooltip - Enable it, if you want the definition generated by ChatGPT to be displayed in tooltips.
- Limit length of Chat GPT data in Tooltip - This option allows to limit the display length of the ChatGPT definition in a tooltip. You can specify here the maximum amount of characters to display. Set "0" to disable the limit. Note: this option was introduced in version 4.3.5.
Show Chat GPT data in Glossary term display - Enable it, if you want the definition generated by ChatGPT to be displayed on the term page.
- Wrap the output from Chat GPT in custom HTML template - Enable it, if you want to wrap the definition generated by ChatGPT with custom HTML template. The template can be specified in the option Chat GPT Wrapper Template.
Chat GPT Wrapper Template - Specify the custom template to wrap the definition generated by ChatGPT. The template accepts placeholders {term} as a requested term, and {content} as an obtained definition.
Example
Let's use the following HTML template:
<hr><div><strong>Definition of "<u>{term}</u>" by Chat GPT:</strong> {content}</div>
- With custom template
Without custom template
- Flush the Cache - Click this button to clean the database from third-party services definitions, including definition generated by ChatGPT. Once the definition of the term is generated, the plugin stores the ChatGPT definitions in the database to save the resources and to make sure that the content of your website stays the same. But if you want to, you can flush the cache and have AI regenerate the answer.
Disabling ChatGPT definitions in specific terms
You can override the general plugin settings for showing definitions generated by ChatGPT in specific terms. To do this, find the metabox CM Tooltip - Term Properties on the term editing page. There you can find 2 relevant options:
- Disable Chat GPT API for this term - If checked, then ChatGPT definitions will not be automatically generated and displayed on the term page and in the tooltip for this specific term.
- Disable ChatGPT button on the term page for this term - This option disables the front-end button for generating a temporary ChatGPT definition on the term page. Note: this option was introduced in version 4.3.8.
Double Click Support
The plugin supports a double-click feature with ChatGPT integration.
It means that every time a word is double-clicked anywhere on the page (even without being defined as a Glossary term), a temporary tooltip will be displayed, containing the definition generated by ChatGPT. If somebody double-clicked on some word, the definition generated by ChatGPT will be cached on your site. So the plugin will not request this word every time somebody double clicks on it, as the result is already stored on your site (until you flush the cache).
Learn more about the Double Click support: WordPress Glossary Plugin (CMTG) - Integrations - Double Click
More information about the WordPress Glossary Plugin Other WordPress products can be found at CreativeMinds WordPress Store |
|
Let us know how we can Improve this Product Documentation Page To open a Support Ticket visit our support center |