AIKit - How To Setup & Use Plugin
AIKit - How To Setup & Use Plugin
powered by OpenAI!
To use the plugin you need to have an OpenAI key. This key is needed to
connect the AIKit plugin with OpenAI’s GPT engine so that it can assist you
with writing.
The setup guide is divided into two parts; first part guides you through
creating an account on OpenAI and generating your API, which you will
need in the second part of the guide where you install and activate the
plugin.
c. At the time of writing, OpenAI gives out $18 of free credit for
their APIs so that you can test them. This credit is very
generous and using it you will be able to generate lots of AI
generated content. (roughly 675,000 words using the most
capable model “gpt-3.5-turbo”).
Once this credit is used up, you will need to enter your credit
card details and purchase extra credit.
d. Once you're in, on the top left click “Personal”, then in the menu
that appears click on “View API keys”.
f. A new API key will be generated for you. Now click on “Copy”
button, and keep that key somewhere (maybe in a notepad)
because you will need that key later once you install and
activate the plugin (later in the steps)
2. Installing and activating AIKit:
1. In your WordPress Admin page, on the left menu click on “Plugins”.
8. Now we will need the API key you generated in step “g” when you
created your OpenAI account upstairs. You will need to paste that key
here on the settings page, then click “Save”.
9. With that step your plugin should be activated and ready to assist you
with writing!
How to use AIKit
AIKit is Gutenberg-friendly. This means it will accompany you everywhere
you write. Whether you are writing a post or a page, AIKit will always be
ready to assist you with writing with the power of AI.
All you need to do is to select the text where you need the help of AIKit,
then under the “AI” menu you will find many options to choose from.
For more ideas on how to use AIKit, please check this video
Configuring AIKit for your needs
1.Settings
AIKit comes with many configurations that make your life easier and help
you tailor your experience with the plugin to your needs.
On the settings page there are a couple of options you can change.
1. Language for text generation: this is the language that you want to
generate text in. For consistent autocomplete results, make sure that
the text you write in your post is written in the same language you
picked here.
If the language you have your text written in is not the same as the
target generation language, the GPT API might get confused and will
generate text in either of these languages.
2. OpenAI Preferred Model: this is the model that the AIKit plugin will
use to generate the content.
Some models are more capable than others. For more information,
see Models - OpenAI API
3. Max Tokens Multiplier: AIKit does a good job figuring out the
number of tokens (words) that need to be generated based on every
autocomplete type automatically. However, if you want to change the
number of tokens, you can do so here.
6. Image sizes available: This setting controls the available sizes that
you wish to use for image generation. These will be the sizes that will
be available to you in the AI image generation menu. Available sizes
are “small”, “medium” and “large”.
7. Image counts for each size: For each of the sizes you choose
(“small”, “medium” or “large”), you can define the number of images
that you want to generate per each size. These will be available to
you in the AI image generation menu.
For example, you can use it to maintain a certain style of images for
your posts. If you like colorful images, you can add "colorful" as one
of the styles. If you want your images to appear as if they were drawn
by leonardo davinci, add "by leonardo davinci" as a style.
Each line would be considered a different style and AIKit will choose
a random style out of this list each time it generates an image and
append it at the end of the prompt.
2.Prompts
AIKit gives you complete freedom to add new prompts, or edit existing
built-in prompts that come with the plugin.
You can also reorder prompts to control where they appear in the “AI”
menu.
To adjust prompts, on the right-size menu under AIKit, click on “AI Menu
Prompts”, then you will be presented with a screen where you can play
around with prompts.
Each of the built-in prompts is presented inside an accordion view. You can
drag and drop these accordions to reorder the prompt. This will affect the
order in which they will appear on the “AI” menu.
Tip: don’t forget to click on the “Save settings” button after you do your
reordering for your changes to take effect.
2.2 Edit Prompts
Each prompt can be edited. There are many options when it comes to
editing a prompt, so let’s go through them one by one.
First you’d need to expand the prompt that you want to edit.
This option gives you the ability to limit (or extend) the length of text
that you want OpenAI to generate for this prompt.
For example, if you are adding a prompt that generates a paragraph,
you might want to limit the length of the output to a certain number of
words for example.
There are two ways you can determine the length of the generated
text:
➔ Fixed number of words:
This option is self explanatory, you can choose it if you want to
limit the output to a certain number of words. As mentioned
above, this option is optimal where you know beforehand the
number of words, so it would be good to use if you are
generating a paragraph for example.
There is where you can define your prompt for each language the
plugin supports.
Each language has a separate tab. In each tab you can enter “Menu
title”, which is the title of this prompt that will appear in the “AI” menu
when this language is selected.
“Prompt” text area is where you can enter your prompt text.
There are many tutorials online available for understanding how to
craft prompts. You can search Google or Youtube for tutorials on that
subject to get yourself acquainted with it.
Note: If this prompt requires text selection, the phrase “[[text]]” will be
replaced by the selected text before doing the request. Make sure to
include it in your prompt.
You will notice that AIKit will show your default language’s tab first. So
if your “Language for text generation” (on the “Settings” page) is
English, then the “English” tab will be shown first.
It is also important to note that you don’t need to enter information for
all languages. Simply enter the “Menu title” and “Prompt” for the
languages that you use, and ignore the others. Languages with no
“Menu title” or “Prompt” will simply be ignored and not show in the
“AI” menu.
You can come back and enter the information for other languages if
you decide to use that language.
Once you enter your prompt information and “Save Settings” you should be
able to see the new prompt in the “AI” menu.
“Add prompt” button allows you to add a new prompt. By default the new
prompt will be added at the end of the list, but you can drag/drop it to adjust
the order in which it will appear in the “AI” menu.
For more information on the options available on the “Add Prompt” screen,
please refer to the previous section “2.2 Edit Prompts”
You can simply click on that button if you decide you want to get rid of a
prompt.
2.5 Reset Prompts
You can use the “Reset prompts” option to reset the prompts to factory
settings. If you did some changes that you don’t like to keep, or if anything
is messed up for any reason you can always “Reset prompts”, and you will
go back to the built-in prompts that come with AIKit out of the box.
AIKit Auto Writer is a tool that helps you write drafts quickly. It’s not a
replacement for you, but can skyrocket your productivity by generating
many articles around a certain topic, focusing on SEO keywords, which you
can revise and edit and publish to your readers.
Here a brief description of each of the fields on the Auto writer screen:
1. Selected language: this allows you to change the language used for
text generation.
2. Brief text: in this text area, write some description about the topic
you want to write about.
3. SEO keywords: this allows you to write a few comma-separated
words that AI will focus on and will be included in the title and body of
the generated post(s).
4. Post type: choose the type of your post(s).
5. Post Category: choose the category of the generated post(s).
6. Post Status: choose the status of the generated post(s).
7. Articles: choose the number of generated post(s).
8. Sections per article: choose how many sections should be
generated.
9. Maximum words per section: choose how many words each
section should contain “roughly”.
10. Include checkboxes: allow you to fine-tune the generation
process, include outline, generate featured images, etc.
You can also change the prompts used by AI to generate the post.
Once you enter all the information, you have two options, either to
“Generate” or to “Schedule”.
If you click “Generate”, the article(s) will be generated right away.
Important:
Note: By default, WordPress scheduled jobs only run when someone
visits your site. To ensure that your scheduled AI generators run even
if nobody visits your site, you can set up a cron job on your server to
call the WordPress cron system at regular intervals. Please ask your
host provider to do that for you. Here is the cron job definition: */5 * *
* * curl -I http://your-website-domain.com/wp-cron.php >/dev/null 2>&1
Each job will be added to the “Scheduler”, which you can open from the left
side menu.
AIKit Repurpose
AIKit repurposing jobs allow you to automatically create new posts out of
existing content (spinning).
You can use this feature to rephrase certain posts/articles and even
YouTube videos or deliver them in a different way to different audiences.
For example, you can use it to summarize new articles and deliver that to
your users as a service.
There are so many possibilities available and sky's the limit to what you can
do using this amazing feature.
Once you enter the URL, the content of the post/video will be loaded for
you so that you can edit it if you like before it’s being used in the
repurposing process.
Once you click “Repurpose”, a repospose job will be added and the
generation process will happen in the background (in a few minutes).
Important:
Note: By default, WordPress scheduled jobs only run when someone visits
your site. To ensure that your scheduled AI generators run even if nobody
visits your site, you can set up a cron job on your server to call the
WordPress cron system at regular intervals. Please ask your host provider
to do that for you. Here is the cron job definition: */5 * * * * curl -I
http://your-website-domain.com/wp-cron.php >/dev/null 2>&1
You can view the jobs scheduled by clicking on the “Jobs” tab.
RSS
AIKit RSS automatic generation jobs allow you to automatically create new
posts out of articles extracted from RSS feeds. Whenever an article is
added to an RSS feed, a job will be scheduled to generate a post based on
it in your site.
Here a brief description of each of the fields:
1. RSS URL: enter the URL of the RSS feed.
2. How often to check for new articles: choose the frequency of
checking for new articles in the RSS.
3. Time to wait between generating articles: in case multiple new
posts have been added to the RSS, enter the number of minutes you
want to wait between the repurpose job of each of them. This is
important to avoid “429 too many requests” errors that happen when
you generate too much text in a short amount of time. 30 minutes is a
good place to start, but you can increase that if you want.
4. Posts to generate: how many posts to generate based on the
original article added to RSS feed.
5. Post type: choose the type of your post(s).
6. Post Category: choose the category of the generated post(s).
7. Post Status: choose the status of the generated post(s).
8. Include featured image: this will auto generate an image that fits the
repurposed post and add it as a featured image.
You can also change the prompts used by AI to generate the post.
Once you click the “Add RSS Job” button, a job will be created that will
keep checking the RSS feed. Once a new article is added to the feed, a
Repurpose job will be added automatically for that article to generate a post
based on it.
As always, you can check the RSS jobs created using the “Jobs” tab.
Embeddings
AIKit Embeddings allows you to turn your data into vector representation
which can be used to build an improved Chatbot experience to answer your
customers' questions about your product or service.
If you prefer video tutorials, please watch this video to learn more about
embeddings.
Qdrant offers a free forever cluster, which is more than enough for the
majority of user needs. And in case your data is huge, you can increase the
capacity of your cluster for a relatively affordable price.
In case you’d like to upgrade to a paid plan, Qdrant offers a special offer
to AIKit users. You can use the discount code “AIKIT” at checkout and
you’ll get a 5% discount on the total price.
First you would need to create your free Qdrant account. To do that please
follow the following steps:
1. Open https://cloud.qdrant.io/
2. Choose your favorite way to sign up for your account.
3. Follow through the process in which you will be asked to give your
cluster a name.
4. After that Qdrant will create an API key for your cluster, please save
this API key in a secure place as it will be needed to connect to your
host later.
Now click on your cluster to expand it, and then copy the “Cluster URL” and
store it somewhere as we will need it later (along with the API key you
already copied before) to connect to your cluster.
Now head to the AIKit settings page, and click on the “Qdrant” tab.
Enter your Qdrant Cluster URL and API key and then click “Save Settings”.
Now we are set. Let’s create an embedding.
Creating an embedding is the first step in turning your data into vectors
(numbers). This can allow you to do semantic search (search by meaning,
not exact words), and that can be used to answer user questions with the
most relevant data from your website. You can create embeddings from
text data (manual input) or from posts and pages on your site.
When you create a new embedding (by clicking on “Create Embeddings
Job” you will be prompted to enter a name for it. Do that, then click “Add
Data”.
On the next screen you will be prompted to either enter your data manually,
or use data from posts or pages you already have on your website.
Entering data manually is straightforward. You will need to enter as many
paragraphs as you want. Each of these paragraphs will be converted later
to numerical form (vector) and stored in Qdrant database. This will allow us
to search these semantically and find the closest result and present it to the
user as a reply to their question (in Chatbot).
If you choose “Posts/Pages”, then you will be able to search and find
pages/posts from your website which will them be divided into paragraphs
for your in the next step, after that you will be able to review them and edit
them however you like before being stored in the vector database.
Once you are done with this step, click “Create Embeddings” (if you choose
manual), or “Preprocess Data” (if you choose “Post/Pages”).
If you choose “Post/Pages”, you will need to wait for the background job to
be executed to collect your data. Once done, you can open the embedding
job to be able to edit data before being used for vectorization.
Once you are done with your review, click “Create Embedding”.
Again, you will need to wait a bit before the embedding job vectorizes your
data and prepares it.
Now our embedding is ready to be used by our Chatbot. Please see the
next section on how to configure your Chatbot to use the embeddings we
just created.
Chatbot
AIKit Chatbot allows you to create a chatbot that can be used on your
website. You, or your users can use it to answer questions and provide
support about your products or services.
For example, if the user asks "How much does your service cost?",
the semantic search will retrieve the closest answer to this question,
for example "Our prices start at $10 per month and you get a discount
if you pay annually.". Then, the answer formulation prompt will be
used to formulate the answer to the user question, for example
"Service cost starts at $10 per month".
At the moment, using embeddings is the best and most efficient way of
providing a great Chatbot experience to your users. The idea behind
embeddings is that you provide some data about your service, product, or
anything you want. This data is converted to numerical form (vectorized),
and stored into a vector database store.
If you prefer video tutorials, please watch this video to learn more about
using Chatbot with embeddings.
Once your user asks a question, this store is being queried to get the
information that’s related to that question, and this information is being
passed on to the GPT API to formulate an answer to the user question
using it and then present it to the user as a response.
In the next section, you will get to know that you can achieve similar results
by fine-tuning your own model, however the results of the answers of the
fine-tuned models can vary and be lower in quality especially in case you
didn’t provide much data for the model to be trained on.
Here is more information about the settings you will encounter while
creating a new fine-tune job:
1. Base Model: Select a model as a base for your fine-tuning. The base
model used in fine-tuning will greatly affect the quality of the results
you will get. "davinci" is currently the most capable model while also
being the most expensive to fine-tune. Please look around and try
different models to find the best model for your case.
2. Model Name Suffix: Enter a suffix name for your fine-tuned model.
This will be used along with the base model name to generate a
unique name for your model automatically.
3. Prompt Stop Sequence: Enter a sequence of characters that will be
used to stop the prompt. Please leave the default value if you are not
sure what to enter.
4. Completion Stop Sequence: Enter a sequence of characters that
will be used to stop the completion. Please leave the default value if
you are not sure what to enter.
Once you are done, click on the “Add Training Date” button.
The next step is about adding in the Training data. OpenAI expects the
training data to be formatted in a prompt/completion pair format. This will
be used to fine-tune the model, where each prompt is kinda like a question,
and the completion could be the answer to that question. Each prompt
(question) could be a question about your product or service, where the
completion is the best (answer) response to that question.
All this will be generated automatically for you using AIKit so you don’t
need to worry much about these formats.
If you want to import the data using a CSV file, choose “Manual”, then you
will find an option to import the CSV file on the top right side.
If you decide for “Manual”, you will need to enter the Prompt/Completion
pairs. Think of these as question/answer pairs where you want to teach the
model about a certain aspect of your business so that more information that
you can enter, the better, and the higher the quality of the data, the better.
If you decide on “Post / Pages”, AIKit allows you to pick posts and pages
from your site to use as training data. The content of these pages & posts
will be divided into paragraphs, and AIKit will generate prompt/completion
pairs based on them by using the model you select.
Once you are done, depending on the training data source you chose, you
will either be able to “Start Fine-tuning” in case of “Manual” data entry, or
“Preprocess Data” if you choose “Posts/Pages”.
In any case, you will have to wait for some time until the prompt/completion
pairs will be generated (if any), then you will have the chance to have a
look at them once again and edit them if you like, or add more data to
them.
Once confirmed, the fine-tuning process will start, and that could take up to
24 hours to finish depending on the amount of data you submit and the
load on OpenAI’s side. Once done your model will be ready and you can
use it as you use any other model.
Important:
For best results, please make sure to set the same "Prompt Stop
Sequence" and "Completion Stop Sequence" in the settings page or
Chatbot settings page when using the fine-tuned model.
Important:
Note: By default, WordPress scheduled jobs only run when someone visits
your site. To ensure that your scheduled AI fine-tunes run even if nobody
visits your site, you can set up a cron job on your server to call the
WordPress cron system at regular intervals. Please ask your host provider
to do that for you. Here is the cron job definition: */5 * * * * curl -I
http://your-website-domain.com/wp-cron.php >/dev/null 2>&1
Text to Speech
AIKit Text to Speech allows you to convert your post content to audio and
can then add an audio player to your post to allow your visitors to listen to
your post content.
AIKit uses ElevenLabs to turn text to speech, and due to the maximum
limitations on characters that can be processed per request, an article can
be divided into different audio files that will be properly played in the correct
sequence in the audio player. AIKit also will make its best effort not to
regenerate all the article audio in case it's updated, but rather regenerate
only the updated paragraphs.
1. Go to https://elevenlabs.io/
2. On the top right, click on “signup”.
3. Follow the normal signup process.
4. Once your account is created, click on the top right profile icon, and
click on “Profile”.
5. Copy your API key.
6. Open the AIKit settings screen, then open the “Eleven Labs” tab.
7. Paste in your API key in the “Eleven Labs API Key” field, then click
“Save”.
On the Eleven Labs settings screen you can play around with the settings,
choose the model used in generating audio, the voice, and also customize
the colors of the audio player.
Now, when you create or edit a post or page, you will find a new widget
where you can trigger generating the audio.
You can tick “Generate Audio” to generate a text to speech for that
page/post, and tick “Add audio player to post (once ready)” to automatically
insert the audio player (via shortcode) to the post once it’s ready.
In case in the future you do some edits to the post/page and want to
regenerate the audio you can do that as well. In this case you will need to
tick “Force regenerate audio” (see below)
All text-to-speech jobs will be added under “AIKit” -> “Text to Speech” page.
You can check the detailed information of each of the text-to-speech jobs
by clicking on them.
Generating Images using Stable Diffusion
Along with DALL.E (OpenAI), AIKit allows you to use Stable Diffusion to
generate images using AI, but for that you will need to create an account at
Stability.ai.
Please follow the following steps in order to create your Stability.AI’s API
key:
a. Open DreamStudio
b. On the top right, click on “Login”.
c. Choose a way to sign up then enter your information.
d. At the time of writing, Stability.AI gives out 100 credits of free credit
for their APIs so that you can test them. This credit is very generous
and using it you will be able to generate lots of AI generated images.
(around 500 images)
e. Once you sign-up, go to your account page: DreamStudio Account
f. Click on “Create API Key”:
Click on “Copy to clipboard”, then keep that key in a safe place (maybe in a
notepad) as we will need it when activating and configuring the plugin later.
Now you will need to enter your key on the settings page of AIKit in order to
be able to Stable Diffusion AI image generation.
Once that is done, you will see the option to generate images using Stable
Diffusion in the “AI menu”.
Don’t hesitate to contact us in case you have any questions or suggestions
any time via CodeCanyon’s messaging system.