WEBVTT

00:00.080 --> 00:05.760
Well, this is a familiar screen, and it's nice that it looks pretty similar to what we saw before.

00:05.880 --> 00:06.960
I'll just show you a few things.

00:06.960 --> 00:11.760
If you come down to settings here, then you can go to like usage and Plan.

00:11.800 --> 00:15.840
This is where you can see, uh, what kind of things that you're working on.

00:16.040 --> 00:20.760
When you get that email with the key, you press Enter Activation Key here to activate or to basically

00:20.760 --> 00:22.120
unlock a few extra features.

00:22.360 --> 00:27.840
And down here it will tell you the version number that you're running, uh, for, for the pros, the

00:27.880 --> 00:29.040
know about this kind of stuff.

00:29.040 --> 00:33.480
When you specify the Docker container, you can put the container name colon.

00:33.520 --> 00:40.920
Next, if you want to be on the sort of latest upcoming version of which, which right now is 2.2. something

00:41.160 --> 00:46.720
for me which but 2.1.3 is, is the sort of the latest official version.

00:47.040 --> 00:50.720
And there's various settings here that that might turn out to be useful for you.

00:50.720 --> 00:53.080
So it's worth knowing about this.

00:53.320 --> 00:58.760
Uh, and if we go back here we are again on this first screen you'll see overview.

00:58.800 --> 01:05.160
There's also a new beta chat version that allows you to chat with the AI to to construct, to work your

01:05.160 --> 01:08.400
way around in, rather than having AI within your workflow.

01:08.720 --> 01:10.640
And there's the same templates.

01:10.640 --> 01:15.120
If you remember that this is a great place to start should you wish to have one that's kind of canned,

01:15.120 --> 01:19.440
that you can use to explore things that other people have built, and we're building from the ground

01:19.440 --> 01:25.520
up in hours just so that you, you really get to understand, um, the plumbing of it and, uh, then,

01:25.520 --> 01:28.360
then then there's the main sections here.

01:28.360 --> 01:33.920
The overview is where we see all of our workflows and where we can get to begin our first workflow,

01:33.920 --> 01:34.880
which is what we'll do now.

01:34.920 --> 01:35.440
Okay.

01:35.640 --> 01:37.040
I pressed start from scratch.

01:37.280 --> 01:38.080
Here we go.

01:38.480 --> 01:39.040
We are.

01:39.080 --> 01:39.840
Let's get rid of that.

01:39.840 --> 01:42.440
There we are looking at a very familiar screen.

01:42.440 --> 01:43.160
It looks the same.

01:43.160 --> 01:44.320
This is the canvas.

01:44.360 --> 01:47.520
Let's see if pressing the plus and minus expands and contracts.

01:47.520 --> 01:48.680
For sure it does.

01:48.960 --> 01:51.240
And see if pressing Tab gets us this.

01:51.280 --> 01:52.320
Of course it does.

01:52.360 --> 01:56.840
We can use our favorite on chat message and then press escape to go back.

01:56.840 --> 01:59.110
Click and press escape to come back here.

01:59.190 --> 02:02.870
We can, uh, press here to to to resize.

02:02.910 --> 02:03.870
Clean everything up.

02:03.910 --> 02:06.030
When a chat message is received, what do we want to do?

02:06.030 --> 02:08.630
Well, press tab to bring up the screen AI.

02:09.190 --> 02:11.830
AI agent and escape.

02:12.030 --> 02:15.870
And we are faced with the usual screen that we know so well.

02:16.110 --> 02:20.710
And it's time for our first chat model when running running, self-hosted.

02:20.710 --> 02:26.270
So I'm going to press here and I'm going to recommend that we go with Open Router, which is what we

02:26.310 --> 02:32.070
set up at the very start, if you remember, because we we can call an open source model that's running

02:32.070 --> 02:32.790
on the cloud.

02:32.790 --> 02:36.670
And since we're feeling like we're we're running this ourselves, open source feels more legit.

02:36.830 --> 02:42.750
But you could equally you could use a llama and run something actually on your computer should you wish.

02:42.750 --> 02:48.030
And if you're familiar with Aloha, maybe you've taken my AI engineering courses, in which case you

02:48.030 --> 02:50.150
can just look at the llama chat model.

02:50.190 --> 02:53.990
Now you probably need to know enough about Docker to to to mess around.

02:54.030 --> 02:55.270
You'll need to run you.

02:55.270 --> 02:56.630
Can you have two choices.

02:56.630 --> 03:02.470
You could run a llama locally on your host, and then just map the port so that you can see that from

03:02.470 --> 03:04.110
within the Docker container.

03:04.350 --> 03:11.110
Or you can use an approach that they recommend on the website, which is to use one of their ready made

03:11.110 --> 03:18.430
Docker compose files, which then will give you a container for for a llama and a container for an and

03:18.430 --> 03:19.670
map between them.

03:19.670 --> 03:25.150
Now the disadvantage of that second approach, whilst it is a very effective approach, a downside is

03:25.150 --> 03:29.030
if you're on a mac, you wouldn't be able to take advantage of your Mac's GPU.

03:29.230 --> 03:34.950
To do that, you would need to run a llama on your host computer, but if you're on a PC, then you

03:34.950 --> 03:35.150
could.

03:35.150 --> 03:37.630
You could do it that way should you wish to do it the technical way.

03:37.630 --> 03:45.070
But for now, we are going to focus on the open router model, because we're going to make a connection

03:45.070 --> 03:47.630
to open router and run open source models in the cloud.

03:47.630 --> 03:52.430
And here we are looking at the credential to connect with.

03:52.710 --> 03:54.230
And we know these credentials well.

03:54.230 --> 03:56.100
We say create new credential.

03:56.140 --> 03:56.660
Up it comes.

03:56.660 --> 03:58.020
It needs an API key.

03:58.140 --> 03:59.060
And this is where I go.

03:59.060 --> 04:01.820
And I copy my API key from Open Router.

04:01.820 --> 04:03.180
And I paste it in here.

04:03.180 --> 04:08.740
And I know to be careful I think it starts src o dash v1 I think.

04:08.860 --> 04:09.900
And I've got it right.

04:09.900 --> 04:13.580
I pasted it in and I'm careful so that I'm not going to be in trouble.

04:13.620 --> 04:17.620
And when I press testing we get the connection was tested successfully.

04:17.620 --> 04:18.420
So did you.

04:18.620 --> 04:21.020
And so now we come back here.

04:21.060 --> 04:21.580
No thank you.

04:21.620 --> 04:22.260
LastPass.

04:22.340 --> 04:25.060
Uh, we have set up our chat model.

04:25.060 --> 04:27.940
We're also going to add in a simple memory.

04:28.260 --> 04:31.820
There we have it and we can have our first chat.

04:31.980 --> 04:32.420
Uh oh.

04:32.420 --> 04:33.820
But we have to select the model first.

04:33.820 --> 04:34.940
I didn't select the model.

04:35.100 --> 04:38.060
Uh it has GPT four or mini but we don't want that at all.

04:38.060 --> 04:40.220
We want a model like deep seq.

04:40.980 --> 04:49.740
Uh, we will choose V3 point two, which for me is the latest and greatest version of the deep seq model

04:49.740 --> 04:52.140
from Chinese startup deep seq AI.

04:52.140 --> 04:52.460
I.

04:52.820 --> 04:55.100
All right, so back we go.

04:55.140 --> 04:57.220
It's time for us to chat with Deep Seek.

04:57.260 --> 05:04.900
Okay, I press open chat and I say hi there and we'll get back something.

05:04.940 --> 05:05.500
Hello?

05:05.540 --> 05:06.700
How can I help you today?

05:07.460 --> 05:12.420
And of course, the great thing about this is that it's all running on the computer.

05:12.660 --> 05:17.500
Deep within the computer, within a Docker container, it's all running beautifully.

05:17.540 --> 05:20.420
It wasn't that easy to set up, but it also wasn't that hard.

05:20.420 --> 05:26.140
And when you think about the enormity of what we're doing, we're running the whole platform on our

05:26.140 --> 05:26.700
computer.

05:26.700 --> 05:31.740
And it's the same if you're on a PC or on a mac, and we're talking through to through APIs to deep

05:31.780 --> 05:35.620
seq and Open Router, and it's all being hanging together on our computer.

05:35.660 --> 05:36.660
That's pretty cool.

05:36.820 --> 05:41.140
Uh, and of course, as I say, you could just deploy this to the cloud yourself, running on your computer

05:41.140 --> 05:43.020
in the same way anywhere.

05:43.180 --> 05:45.580
And it's all working just great.

05:45.660 --> 05:48.140
That is our first AI agent.

05:48.260 --> 05:49.300
Running.

05:49.540 --> 05:53.050
Running locally, self-hosted on our computers.

05:53.050 --> 05:57.250
And of course, it wouldn't really be a agent if we didn't give it a tool.

05:57.730 --> 06:05.050
Uh, because an agent is an LLM in a loop equipped with tools to achieve a goal.

06:05.370 --> 06:06.650
Uh, you remember that?

06:06.650 --> 06:10.290
So we are going to use our old friend market stack.

06:10.290 --> 06:11.210
Remember that?

06:11.250 --> 06:12.730
A nice one to start with.

06:12.770 --> 06:15.170
We have to connect it with a credential.

06:15.170 --> 06:17.490
We say create new credential.

06:17.490 --> 06:19.930
We paste in an API key and you have to get it right.

06:19.970 --> 06:22.010
You have to copy that API key, press save.

06:22.450 --> 06:24.170
We don't get a green thing with this one.

06:24.170 --> 06:26.010
But but I know that I got it right.

06:26.170 --> 06:27.410
Uh, okay.

06:27.450 --> 06:29.450
And now you remember there's some fiddly stuff here.

06:29.610 --> 06:34.850
We want to say that the model can choose which ticker to use.

06:35.090 --> 06:37.050
And then we have to add a filter.

06:37.050 --> 06:38.090
Latest.

06:38.090 --> 06:40.130
And I always forget to turn that on.

06:40.130 --> 06:42.210
You have to turn on the latest filter.

06:42.250 --> 06:43.410
Otherwise it doesn't work.

06:43.570 --> 06:45.330
So that is set up.

06:45.330 --> 06:48.490
And now we have something new to test.

06:48.650 --> 06:49.610
Let's try it.

06:50.050 --> 06:54.730
And I should probably mention that deep seek and open router aren't super reliable at tool calling.

06:54.730 --> 06:58.490
Something funny sometimes happens, so you have to sometimes try a few times, but we'll see.

06:58.690 --> 07:03.090
Uh, I don't know if it's a deep sea problem or an open router problem or a combo between the two.

07:03.170 --> 07:04.570
But anyway, let's give this a try.

07:04.610 --> 07:06.170
So I'm going to say, uh, hi there.

07:07.970 --> 07:08.770
Off it goes.

07:08.770 --> 07:09.970
Stuff happens.

07:10.010 --> 07:10.730
Thinking.

07:13.570 --> 07:14.050
Hello.

07:14.090 --> 07:16.450
I'm here to help you with financial data.

07:17.610 --> 07:20.170
Uh, it's already so it's looked at the tool.

07:20.170 --> 07:21.770
It's found out what it can do.

07:21.930 --> 07:25.330
Uh, when I say it's looked at the tool that was in the system prompt already, the description of the

07:25.330 --> 07:25.690
tool.

07:25.850 --> 07:28.570
And so it's telling us that that's what it can do.

07:28.690 --> 07:30.610
Uh, what stock would you like information about?

07:30.730 --> 07:36.210
Please tell me the price of Apple.

07:37.850 --> 07:38.730
Let's let it do its thing.

07:38.770 --> 07:40.290
See if it calls the tool here.

07:40.290 --> 07:41.370
It didn't call the tool.

07:41.370 --> 07:42.890
You see, you get this thing.

07:43.090 --> 07:47.850
Uh, it's it's responding with, um, uh, function invoke.

07:48.320 --> 07:49.120
Let's try that.

07:49.120 --> 07:55.880
Just simply a please tell me the stock price of Apple.

07:56.000 --> 07:57.200
Let's just try it again.

08:00.480 --> 08:02.760
Look to see whether that tool is getting called or not.

08:04.000 --> 08:04.360
There we go.

08:04.400 --> 08:05.840
I just saw the tool got called.

08:10.880 --> 08:13.360
And it's thinking maybe a long answer here.

08:16.080 --> 08:18.920
Still thinking, but you can see it's got that information right there.

08:21.000 --> 08:21.680
There we go.

08:22.240 --> 08:24.720
Uh, maybe I need to make this a bit bigger for you.

08:24.760 --> 08:30.320
Hang on and expand this up based on the latest available data.

08:30.520 --> 08:32.320
And there is the information.

08:32.320 --> 08:35.280
So for whatever reason, we had to ask the question twice.

08:35.400 --> 08:40.600
Uh, if you wanted to, you could put in, like, an if, uh, node there and put something in to make

08:40.640 --> 08:42.840
sure that it repeats until you get back a good answer.

08:42.960 --> 08:48.600
Uh, if you want to get fancy, but you should experiment with different models, you'll almost certainly

08:48.600 --> 08:55.080
find that it's just just a problem using deep seq 3.2 through Open Router, that it's not always reliably

08:55.080 --> 08:59.480
calling the tool, and there'll be other models that will do it more reliably.

08:59.480 --> 09:03.760
But this is showing you that we've been able to use an open source model.

09:03.840 --> 09:10.320
And then using driven from our self-hosted instance of Nate and using a tool with an agent.

09:10.320 --> 09:11.720
And it's all work great.

09:11.720 --> 09:17.640
And just so we can go with one that's bound to be, uh, completely bulletproof, let's go into our

09:17.880 --> 09:29.720
model here and let's just change this to be open AI, GPT oss 120 be, uh, OpenAI's top open source

09:29.720 --> 09:33.600
model running through open router so it won't be connecting with OpenAI at all.

09:33.640 --> 09:40.280
It's their published weights, uh, being run by but on open routers or one of open routers providers

09:40.280 --> 09:41.160
infrastructure.

09:41.360 --> 09:43.360
Um, okay, let's go back.

09:44.320 --> 09:45.990
Let's, uh, save that.

09:45.990 --> 09:46.910
Go back here.

09:46.910 --> 09:49.990
I'm going to clear this out, and then we will try this one more time.

09:49.990 --> 09:51.710
And so I say hi there.

09:53.990 --> 09:54.550
Hello.

09:54.550 --> 09:55.670
How can I help you today?

09:55.710 --> 09:56.670
It's familiar, isn't it?

09:56.710 --> 10:02.070
It sounds very like, uh, GPT, uh, I'd like to know.

10:04.590 --> 10:05.750
The closing price.

10:05.910 --> 10:06.910
I just say the price.

10:07.230 --> 10:09.910
The price of Apple stock.

10:10.910 --> 10:11.710
Let's see what happens.

10:11.710 --> 10:12.470
Off it goes.

10:12.470 --> 10:14.150
You can see the tool is called.

10:14.310 --> 10:18.390
And it says the most recent closing price for Apple in the data we have is 270.

10:18.630 --> 10:23.670
Uh and so of course OSS super reliable, very bulletproof.

10:23.830 --> 10:27.830
Uh, so you could try this out a few times and then you have another tool, a jankiness.

10:27.870 --> 10:29.990
It should all work very nicely indeed.

10:30.230 --> 10:34.750
And so give this a try and experiment with, with other things you can do with it.

10:34.750 --> 10:39.790
Use some of the things from earlier in the course and confirm that with the exception of webhooks and

10:39.830 --> 10:43.430
OAuth, uh, things will be basically identical.

10:43.430 --> 10:44.270
Give it a try.
