0:01
hey guys uh this video is sponsored by FreelyGive FreelyGive H hires me to write open source code for the AI module which is awesome uh so if if you need help with
0:14
Drupal and AI combination or Drupal in general AI in general please contact us we're a full service provider that can help you with anything on these topics we have a lot of smart
0:27
people so it's beenin a minut it um because I've been working on this module the AI module uh I've been focusing very heavy heavily on it and there's two reasons I haven't uh done
0:42
videos so one thing is I spent so much time on this that I I really didn't have any time uh outside of my family to actually do any videos so you know there was just not time there's so much stuff
0:55
that we want to make between my ideas and Jamie's idea here uh that I work with that it's just just wasn't feasible uh and we wanted to have a lot of stuff basically ready before Barcelona so
1:10
DrupalCon Barcelona in next week but finally it's it's starting to come down the other reason was that because it's under heavy development I didn't want to show stuff that just you know gets
1:22
outdated in a month's time so uh because of that it didn't make sense and this also a the reason why I will uh you might have read about uh AI search which is really cool but I'm not
1:37
going to Showcase that much about it yet because it's very much still experimental stuff might change so I don't want to showcase something that gets you know I spend a lot of time
1:47
doing a video and then it's just uh uh deprecated this information In Like A month's time but I'm going to talk about the module today subm module today that is fairly stable now uh that actually
2:00
come comes from the OpenAI module it comes from the brain of Kevin Uh Kevin that has uh had this in the OpenAI module but he has improved it a lot and that's a plugin for CKEditor where you
2:12
can give the editor uh some different ways of interacting inside CKEditor with uh AI uh and Kevin has spent a lot of time now uh first of moving it then to the uh
2:27
from the OpenAI into a pro Byder agnostics system like in the AI module but he also has moved uh moved out all of the JavaScript or abstracted it away so now it's just a Drupal plugin system
2:42
where you need to write one plugin code to create one more uh feature for this which is really awesome because it makes stuff a lot easier uh I should also mention Frederik Wouters have spent a lot of
2:55
time uh uh fixing up stuff uh uh around the module to make it even more awesome so the these what I'm going to show today is the brainchild from Kevin and a lot of
3:08
time spent from Frederik I have spent outside of code reviews I haven't spent any time on this actually it doesn't come for me at all but um I'm just going to Showcase it so you know how to use
3:21
it uh so let's get started what I have added on this site uh before I uh uh started this video is I have installed the site I've added the key module and added my OpenAI key that's it I have
3:36
added admin tool bar andin uh theme as well to make it look a little bit nicer uh well I have it added gin I'm not using the ad tool bar sure um so we're going to start with AI
3:50
Core and uh install that and the AIC editor integration that's what we're going to talk about today then and I'm going to add the open a provider install this and then the first
4:04
thing we're going to do is set up the OpenAI provider so that's under AI provider settings OpenAI authentication just connect it to my key if you don't know how to create a key
4:14
you just click here save this and there's a lot of status messages here because something that can happen now is when you set up a provider if there is no default provider
4:25
set up for a specific operation the provider can ask to to become the default for this uh and this is because we want as easy of an installation process as possible because the defaults
4:38
or something then that the different third party modules like the CKEditor can use and there's a lot of messages here because OpenAI does a lot of stuff it doesn't just do you know normal chat
4:49
it also does uh like transcription it does create audio from text create images from text embeddings uh we also have two modes that's called chat with image Vision
5:02
which means uh chatting but being able to look at images because not all LMS or most LMS can't do that uh and chat with complex JSON which is uh there's no clear definition for
5:18
this but we have set it where we feel that a model is good enough to work with complex stuff like AI search or AI automator where we're asking it to generate JSON
5:30
uh if you take G Gemma 2B or some small model it's not going to be able to do this so it makes no no sense to even try to set this up for those kind of stuff if you want to change this this is
5:43
under ai ai default settings and you can change to whatever model you want for this different things uh but you're just going to see what fits so if you look at
5:52
complexation you see there is no GPT 3.5 for instance it's just not good enough for that uh same with you know image Vision you're not going to see 3.5 because it can't do Vision or or
6:06
actually the uh new model 01 can do Vision so you wouldn't see it there as well when you have done this for the CKEditor then the important stuff is under content authoring text formats and
6:20
editors we're going to go into full HTML uh because this is the one we want to change and oh the configuration was there let just let me save here because I I tested this one time so this is how
6:35
it's going to look when you install it you just have to take the AI editor drag it down here it's going to show up AI tools here and then you just enable the stuff
6:46
that you want to use and there's currently four plugins that comes with it there's a very simple summarization I'm not going to show that that's very simple you just enable it basically
6:58
there's translation uh where you can translate text there's generate with AI where you can generate text from just a description inside your editor field and there is tone that can
7:11
rewrite a text in a certain tone but what is cool with this now is that you can connect these to actual taxonomies so you can create your own list of to tones and own list of translation
7:22
languages uh and also how it's supposed to generate this so I'm going to show this now I'm going to just here open uh tonomy and add a vocabulary that we call Tone and I'm going to add a term that I
7:40
call angry so we could leave it at this or you what you could even do is you could create the tone of voice and then there is actually uh the uh possibility to turn on allow autoc create then instead
7:57
of a select field this becomes a autocomplete field field where people can start adding their own stuff because you might know not know of all the tone of voices that you want on the website
8:07
or that your users want on the website uh but you want them to be reusable so you see them when you start typing but in this case we're going to uh at least for the uh at least for the tone of
8:21
voice we will create them ourself but the cool thing is here also you can use the description field to actually say how it should uh translate this toone so you can leave it with angry what's going
8:33
to happen then there's going to be a prompt that says can you take this text snippet and rewrite it as the tone of voice that is angry something like that that's not the voice but it's something
8:44
like that but instead if you add a description it's going to use that description as well like how you're going to use it so I will write here sound very angry and use the word bad at least
8:59
twice okay so this is going to sound very angry and use the word bad at least twice when we use this and then we can do positive be very positive and write how appreciative you are and write thank you
9:24
to the audience so we have to uh very distinct tone of voices we're just going to reload this I have to drag it here now again because I never saved and we go to tone and we're going
9:40
to choose tone here then and then we're going to enable it oh while I'm doing that I can add another uh vocabulary here just called uh translation language but this I'm not going to add any terms
10:01
we can allow autograde there okay uh tone we still have and we use term description for tone description allow that and here you can choose the model by the way as
10:12
well uh the other thing then is that we're going to use translate and in this case we use translation language we enable it and we allow outo create in this case uh for for Generate with AI we just
10:31
enable it we can let the AI provider be there so now when we have done that we can just start adding our content as a editor you're going to see this well I'm going to choose full HTML because that's
10:45
what to re change in this case and I'm going to start with generate with AI so I click on this and I can just write here what I want to do so uh uh write me two
10:57
sentences about p penguins and yeah I just click generate and it's going to write me two sentences about penguins now then and H if I'm not happy with that I can always just
11:11
regenerate regenerate and when I am happy I just save changes to the editor or can of course even cancel if I'm not happy with anything and when I've done that I can
11:21
mark text now now I'm going to use the tone of voice so we take tone we select that we want the first sentence here than to be angry so penguins are bad the bad so you
11:35
see it's using bad to times is using our way of writing it uh we take this one as well and take tone but we take happy or positive instead here change the tone it's going to say hopefully thank you
11:50
yes and be very appreciative so so that is tone of voice what we can do then as well we realized okay we wanted this actually in Spanish so then we you see here is outo complete
12:03
instead so I just write Spanish quick translate and we get this in Spanish instead and now if I were to uh try to translate this again and start typing Spanish you see it's there because it's
12:17
autoc completing uh so that is it that's the CKEditor uh uh module and yeah thanks to Kevin thank thanks to Frederik again uh hope you like to use it