---
title: "Chrome Browser as your AI"
video_id: AXOrTa8_S9o
url: https://www.youtube.com/watch?v=AXOrTa8_S9o
workflow_page: https://workflows-of-ai.com/workflow/chrome-browser-your-ai
language: en
captions: generated
---

0:00 This video is sponsored by Freely Give.
0:02 If you need help with Drupal NAI, get in
0:05 contact with us. First of all, happy new
0:08 year. I'm going to showcase a video now
0:10 that you might feel like, okay, this is
0:12 definitely not something new. I have
0:14 seen all this before. Just wait 2
0:17 minutes and I will come to the kicker
0:19 with this. So, this is a restaurant
0:21 review site. It has like a review title,
0:24 image, some ratings you have to fill
0:26 out, categories,
0:29 uh, address, and homepage. I just set
0:32 this up in like half an hour to showcase
0:35 something. Uh, I'm just going to paste
0:37 in something I created with chat GPT,
0:39 but it's based on what I feel about
0:41 Mustafa Musicub. If you ever go to
0:43 Berlin, don't go there. It's a tourist
0:44 trap. Uh, and you can start with seeing,
0:48 for instance, there's a spelling error
0:50 here. So, if we set up the CK editor or
0:52 assistant correctly, we can fix spelling
0:54 using AI. So, we're just going to fix
0:56 spelling. It gives us another
0:59 uh version that fixes that, right? So,
1:02 we're just clicking here and we can do
1:04 another thing here. We say that we want
1:08 to change the tone to be, I don't know,
1:10 sarcastic. You know, you can add
1:12 whatever you want here with whatever
1:14 context you want. So, it becomes a
1:18 little bit more sarcastic. for instance.
1:20 Next thing I want to do is upload an
1:21 image. I'm going to start by taking like
1:24 a image of a family which has nothing to
1:27 do with restaurant reviews. We're using
1:30 AI now to validate this. So this
1:32 actually says that like this image
1:34 should be showcasing the restaurant or
1:36 some food from the restaurant which this
1:38 obviously doesn't do. So we can't save.
1:40 So we're using the AI validation module
1:42 for this. So let's instead then upload
1:46 an actual picture of Mustafa's um Gim
1:50 music kebab. I didn't take this picture.
1:52 It's just for showcasing here. And then
1:54 we can also generate the all text using
1:56 AI. So we can use a lot of AI here. It
2:00 creates a kebab food stand with two
2:02 workers and so on. Uh and now I'm going
2:05 to then run the automators. So this is
2:09 not something that I recommend you to
2:12 do. You should not set ratings on a
2:14 review site using AI. I'm just going to
2:17 showcase that you can do this. So wait
2:19 time rating should be very long because
2:21 there's a lot of tourists in there,
2:23 right? Uh very low. I mean price rating
2:26 should be very low as well. They are
2:28 very expensive while the food rating is
2:30 probably okay. Uh it should also
2:33 categorize it. Uh uh there is no like
2:36 specific doner in this case. So I'm
2:38 guessing I some of German, Middle
2:40 Eastern. Yeah, we'll see what it does
2:43 actually. Uh, and it's going to actually
2:46 go in search Google places for the
2:49 actual address to get it correct and
2:52 paste the homepage on something that's
2:54 here. So, we have it here. I'm just
2:56 going to click save now. And this is
2:58 going to happen automatically. Of
2:59 course, you can use field widget actions
3:01 module if you prefer uh actual buttons
3:05 for this.
3:11 So we are finished. I will just say two
3:14 caveats here before I go to the kicker
3:17 that I sped it up now. uh um so it is uh
3:23 sped up and I've actually tried this a
3:25 couple of time because what we're coming
3:27 to here is not as uh reliable on maybe
3:32 more complex thing as uh for instance
3:34 open AI provider is but you will see it
3:37 has filled out the rating it has
3:39 categorized it as oh Middle Eastern
3:41 street food I think the Germans would be
3:43 angry for this actually the owner is
3:45 German uh and it has actually found the
3:49 correct address by searching Google
3:51 places. It has filled out the
3:54 uh uh homepage. So now to the kicker
3:56 then this was not done using one of the
4:00 54 providers we have in Drupal now. So
4:03 it's not open AI it's not anthropic
4:06 something like that. This has actually
4:08 not left my computer
4:10 but this is still not you know what we
4:13 have had before. We have had LM studio,
4:15 llama, some other things that you can
4:18 host or run locally. So what actually
4:21 happened here for every provider call we
4:24 did this has actually returned this into
4:29 my browser. So I'm running Chrome right
4:31 now.
4:33 And there is actually a way to have a
4:36 provider running inside Chrome. And in
4:38 my case, I'm running this on my pretty
4:41 crappy laptop. It has 16 GB of RAM, but
4:44 that's it. There's no GPU in it, and it
4:47 just works.
4:49 So, let's go through how this works.
4:55 So, the links I'm going to show you now
4:57 are going to be in the show notes. Um,
5:00 what you actually see here is the
5:02 documentation for what's called built-in
5:04 AI. So, this is still experimental, and
5:07 I'm I'm going to be uh honest here.
5:09 Everything I show you now, it's
5:11 experimental. So it's experimental in
5:13 terms of
5:14 uh how how this works in Chrome. There's
5:17 flags that you have to turn on. So it's
5:20 not that it works from the beginning. Uh
5:23 uh the way you get it working in Drupal
5:25 is also experimental.
5:27 So um there are places where you can
5:31 basically read about it but you can see
5:33 here how it works. So the web
5:35 application can basically call this via
5:38 JavaScript and depending on your local
5:41 hardware, it can actually download a mod
5:43 model that adapts. So if you have GPU,
5:47 you can actually get better outputs than
5:50 what I showed. Now,
5:52 uh the example I showed are I actually
5:55 kind of chose those uh depending on what
5:59 I knew the 16 GB RAM model would handle.
6:03 uh and I have also I will note as well I
6:06 have done changes to the automators to
6:08 actually run that with structured
6:10 output. So structured output is
6:12 something that this model uh uh
6:14 supports. This is something we have a
6:16 issue for anyway in 2.0 because this is
6:19 probably the way to go forward with
6:21 automators. I will show put this in the
6:23 show notes as well. If you have uh
6:25 actual uh um
6:28 if you have actual uh opinions about
6:31 that you can write there. We have a
6:33 discuss issue if we should be doing
6:35 that. Uh anyway this download a model
6:39 that is on your browser and this only
6:41 has to happen once then not per website
6:43 or something. It downloads so other
6:45 websites can use it.
6:47 And what happens then is when you send
6:50 something to our AI providers and you
6:53 specifically ask for it to use the
6:56 browser provider that is called uh I
7:00 will show it here. So it's the browser
7:01 provider. Uh so if you just uh get the
7:07 dev version of this install it it's
7:10 available and I will showcase that in a
7:12 second. uh the first time you use it, if
7:15 you haven't uh uh downloaded the model,
7:18 there will be a popup uh on your Drupal
7:21 account that basically tells you, hey,
7:24 you need to get the model. You download
7:26 the model
7:28 uh and what happens then compared to any
7:32 other models. We can go through it here
7:35 actually. So we can use the API explorer
7:38 because in the API explorer of course
7:41 um you can try different browsers. So we
7:44 have a typical open AI uh what model are
7:47 you? And now I'm I'm not going to speed
7:50 up anything so you can just see the uh
7:52 comparison here.
7:55 Uh wait, we also do this so it becomes
7:59 uh uh comparable answer in one sentence.
8:04 So it actually doesn't create you know a
8:07 lot of tokens on one place and no tokens
8:09 on the other. Then you have just another
8:12 provider called the browser client. The
8:15 reason we have named it browser client
8:16 is because in the future hopefully all
8:18 browsers will uh be able to support this
8:22 um uh or there uh might be support by
8:28 other mechanisms like web assembly right
8:31 but right now we only have the model
8:33 Google chrome
8:35 uh and we can just go ahead and ask it
8:37 so what happens now is this is sent to
8:39 the back end
8:42 uh then we have a place in the front end
8:43 that's currently polling. But what we
8:46 probably want to do instead of polling
8:48 there is that uh we actually add a
8:52 noode.js sidecar that has websockets or
8:55 something like that. So you don't
8:56 actually have to wait for it. So now
8:58 it's finished. You can see I'm gma a
9:00 large language model created by Google
9:02 Deep Mind. Um anyway, so it starts
9:05 pulling when there is something for it
9:06 to work on. It starts working on this
9:09 and gives a response. Now there's one
9:12 caveat here for security reasons of
9:14 course this is connected to a user. So
9:17 this does this does work on a anonymous
9:21 user if you start creating a session
9:24 because then it can store this um this
9:27 in a session but if you have a
9:30 completely anonymous user you you have
9:32 some kind of CDN in the way so you can't
9:34 start sessions well then this currently
9:37 doesn't work because I I added this as
9:41 long as we're doing this experimental
9:43 this is just a very clear security
9:45 mechanism to make sure that you know you
9:49 don't ask something and this runs on a
9:51 not the person's computer. So it always
9:54 runs on the computer of the person
9:56 logged in
9:59 um or the session where it's created.
10:03 Uh and that is basically how it works.
10:06 So now um oh before I show you how to
10:08 set it up which is actually very simple
10:11 but anyway there is also this that came
10:14 from the Oasis 2025 event. Uh so there
10:19 was a hackathon there and some people
10:22 realize okay this is perfect for Zika
10:24 editor and to be honest this is the the
10:28 I I'm not going to say the real
10:30 implementation but how you really want
10:32 to do it is having JavaScript talk to
10:34 JavaScript right um
10:38 so what you get here is some uh uh CK
10:41 editor tools as well the difference then
10:44 with the browser provider is that it
10:45 gives you access to the whole uh actual
10:50 uh um
10:52 ecosystem of modules in Drupal. So
10:55 everything we have created in Drupal uh
10:59 will be available using that. And there
11:01 are obvious uh one obvious caveat that
11:04 of course if you're running 16 GB of
11:06 RAM,
11:08 the response won't always be great. So
11:11 when I'm trying to to
11:13 uh for instance have it uh you know do
11:18 the the uh do this um rewrite of tone
11:22 sarcastic
11:24 then sometimes it answered yes I can do
11:28 that and then came the text and stuff
11:29 like that. Um
11:33 the
11:34 other
11:36 um
11:38 um
11:40 the other caveat is of course there's a
11:42 lot of Chrome flags you have to run
11:44 Chrome and so on. Um, so yeah, there
11:48 there are some things you have to think
11:50 about when you're using this, but there
11:54 are also clear clear advantages
11:58 because
12:00 yes, you can already in Drupal in
12:03 production grade run uh your own local
12:07 model using LM Studio, VLM. I I don't
12:11 know all of the providers we support.
12:15 The problem is that first of all you if
12:17 if you are using it you have to trust
12:20 that that website doesn't actually send
12:23 it somewhere else right so that's one
12:25 thing uh the other thing is if you're
12:28 hosting this this is not super easy to
12:30 scale if you if you have to have a lot
12:33 of users using it. So if 20 people asks
12:37 at the same time, you know, that's going
12:39 to start queuing it up. It's going to
12:41 take time. But if that's 20 different
12:44 people with their own uh computers where
12:48 they can run the model themselves,
12:50 that's awesome. Plus, you can also see
12:52 that it really stays uh locally. And
12:56 this also opens up things like you know
13:00 when you trust Anthropic or Gemini or
13:03 OpenAI or something like this what you
13:05 can do is run a prevalidation like does
13:08 this actually have some PII
13:11 and that runs on the client's computer
13:13 and when that is approved then it can
13:15 send off to a bigger model uh in the
13:18 cloud.
13:21 Um, so anyway, uh, let me show you. I'm
13:26 just going to extend. I saw I need to
13:28 actually update this website, but it's
13:29 just running locally. It's never being
13:31 pushed. Uh, so the only thing you
13:34 actually do is, you know, go here. We
13:38 haven't done a release yet, and we're
13:39 going to keep this in PC for a long
13:42 time.
13:43 uh just copy this and uh install it as
13:48 always after you gotten it with composer
13:51 and as soon as you have done that there
13:54 is provider settings
13:56 uh there's no API keys to set up or
13:58 anything like that but you can set up
14:00 timeout where you basically say uh if it
14:03 hasn't finished within this something is
14:05 probably wrong
14:08 uh polling interval how often should it
14:09 check for new requests
14:12 Uh and you can also set allowed roots
14:14 where uh it should be checking for this
14:16 request because you might not actually
14:18 want it to pull on every Drupal website
14:21 always, right? So if you know you're
14:23 just going to use it on node editing,
14:26 you might just have the polling on node
14:28 editing as well. Um you can actually,
14:32 this is a uh uh
14:36 way you should probably not be utilizing
14:38 it, but say that you actually have a
14:40 MacBook. MacBooks are pretty uh strong
14:42 when it comes to uh being able to host
14:45 models. What you can do is you can log
14:47 in on one computer on one route and have
14:51 it pulled there and this works as a
14:52 proxy for your account somewhere else
14:56 because it is the uh when you're logged
14:59 in is it is a shared session, right? So
15:02 you could actually have two computers in
15:04 that case uh utilizing this
15:08 [sighs]
15:09 um
15:10 and that is it because otherwise as I
15:13 showed you in the AI API explorer this
15:16 just becomes you know another provider
15:20 as anyone else. So when you're setting
15:23 up your default settings or when you're
15:26 setting up automators or or when you're
15:28 setting up sik editor, you can just
15:31 choose this model and that's it. Uh so
15:36 it's pretty cool. I will also say for
15:38 AI2.0,
15:40 so we're on 1.0, right? Next breaking
15:43 change, we're looking into maybe how
15:45 this can be part of the actual core. So
15:47 you don't need to actually install
15:50 external mod uh module for it. So for
15:53 the 1.x branch this will always stay
15:55 experimental and I think it will take
15:57 time before the browser providers also
16:00 makes this into something stable.
16:03 Uh but in 2.0 we might actually
16:06 seriously look into how we can uh
16:09 introduce APIs for this and how it can
16:11 be part of the actual AI module or 3.0.
16:16 Let's see where it lands. is interesting
16:19 and I I think it is already in a place
16:23 where if you know at least I mean you
16:26 shouldn't use it for end users but if
16:28 you have editors those editor has
16:30 MacBooks
16:32 and uh you have expensive builds right
16:36 now because either you're hosting Oama
16:39 or LM Studio VLM or something yourself
16:43 or you might actually be using some of
16:45 the the bigger models but you don't want
16:47 to pay for it or you don't want to send
16:49 it. As long as you know who is using it,
16:52 you could actually start using this and
16:55 play around with it. Um,
16:59 and as always, if you want to
17:01 co-maintain, there's always that
17:03 possibility. And if you find bugs, just
17:05 add them to the issue cube. Thank you
17:07 for watching.
