WEBVTT

1
00:00:00.200 --> 00:00:05.186
Hey everyone Welcome to the AI engineering app setup So this is gonna be a

2
00:00:05.186 --> 00:00:05.519
little

3
00:00:05.519 --> 00:00:09.284
bit overwhelming but uh it shouldn't take too long for you to set up We're gonna

4
00:00:09.284 --> 00:00:09.519
set

5
00:00:09.519 --> 00:00:14.317
up all the services right up front so that we can focus more on the actual AI

6
00:00:14.317 --> 00:00:14.599
engineering

7
00:00:14.599 --> 00:00:16.920
part of the boot camp as we go into it right

8
00:00:17.429 --> 00:00:22.683
So you're gonna want to start here at this uh GitHub dataexpert.io um AI

9
00:00:22.683 --> 00:00:23.059
application

10
00:00:23.269 --> 00:00:28.483
um October 2025 So this is gonna be where you want to start right So you you

11
00:00:28.483 --> 00:00:28.789
should

12
00:00:28.789 --> 00:00:32.907
have that cloned right So I have it cloned here right You'll see like if I this

13
00:00:32.907 --> 00:00:33.149
is

14
00:00:33.149 --> 00:00:37.030
where I have it currently cloned so you can You can do that by like either doing

15
00:00:37.030 --> 00:00:37.259
an

16
00:00:37.259 --> 00:00:42.224
SSH clone or an HTTPS clone Hopefully you know how to do this with Git Uh if not

17
00:00:42.224 --> 00:00:42.500
learn

18
00:00:42.500 --> 00:00:46.255
how to do this set up your SSH keys That's not something we're gonna cover here

19
00:00:46.255 --> 00:00:46.490
So

20
00:00:46.539 --> 00:00:51.998
um if you don't uh definitely reach out to um the TA's or your groupmates and

21
00:00:51.998 --> 00:00:52.340
they

22
00:00:52.340 --> 00:00:55.727
will help you be able to clone this So then the very next thing you're gonna

23
00:00:55.727 --> 00:00:55.939
want

24
00:00:55.939 --> 00:01:02.173
to do is create um a private repo under your name So I'm gonna go ahead and

25
00:01:02.173 --> 00:01:02.539
create

26
00:01:02.539 --> 00:01:03.368
a new repo

27
00:01:04.500 --> 00:01:09.381
Right I'm gonna call this repo I'm gonna call this AI engineering boot camp

28
00:01:09.381 --> 00:01:09.730
right

29
00:01:09.900 --> 00:01:14.356
Uh AI Engineering bootcamp app We'll call it AI engineering bootcamp app right

30
00:01:14.356 --> 00:01:14.698
And

31
00:01:14.698 --> 00:01:19.123
then uh we should be able to create this as a private repo choose visibility

32
00:01:19.123 --> 00:01:19.418
make

33
00:01:19.418 --> 00:01:22.996
this private So the reason why it needs to be private uh is because some of

34
00:01:22.996 --> 00:01:23.219
y'all

35
00:01:23.219 --> 00:01:27.250
are going to be dumb and publish the keys which is gonna break other people's

36
00:01:27.250 --> 00:01:27.519
apps

37
00:01:27.519 --> 00:01:32.009
and uh So make sure that it's private here because if you publish your OpenAI

38
00:01:32.009 --> 00:01:32.308
key

39
00:01:32.308 --> 00:01:35.180
onto a public GitHub repo it will break

40
00:01:35.918 --> 00:01:39.359
everyone's app because keep in mind OpenAI is dumb and you guys are actually all

41
00:01:39.359 --> 00:01:39.588
sharing

42
00:01:39.588 --> 00:01:43.744
the same key That's just how it works So we're going to go ahead and create a

43
00:01:43.744 --> 00:01:43.989
new

44
00:01:43.989 --> 00:01:48.846
GitHub repo here So later on in the future like uh you know as this bootcamp

45
00:01:48.846 --> 00:01:49.150
concludes

46
00:01:49.230 --> 00:01:51.978
this is something that you can probably switch to public so it can be part of

47
00:01:51.978 --> 00:01:52.150
your

48
00:01:52.150 --> 00:01:56.517
portfolio but it needs to be private for now So then what you want to do here is

49
00:01:56.517 --> 00:01:56.760
we

50
00:01:56.819 --> 00:02:00.607
we have an existing repository here right So we're gonna go ahead and uh follow

51
00:02:00.607 --> 00:02:00.859
the

52
00:02:00.859 --> 00:02:04.704
existing repository instructions So we're gonna go here and we're gonna say get

53
00:02:04.704 --> 00:02:05.000
remote

54
00:02:05.000 --> 00:02:09.741
A and I'm just gonna call this instead of origin here I'm gonna um I'm I'm gonna

55
00:02:09.741 --> 00:02:10.020
call

56
00:02:10.020 --> 00:02:15.758
this project right So now what I can do is I can say get push project main

57
00:02:17.710 --> 00:02:19.088
And now you'll see

58
00:02:20.469 --> 00:02:25.579
It's up it's up and running So now this is gonna be your personal version of

59
00:02:25.579 --> 00:02:25.899
this

60
00:02:25.899 --> 00:02:30.961
code right So we have the the data expert version which is gonna be the the you

61
00:02:30.961 --> 00:02:31.258
can

62
00:02:31.258 --> 00:02:34.583
do this either with forking or the way I just showed you how like you can either

63
00:02:34.583 --> 00:02:34.778
have

64
00:02:34.778 --> 00:02:38.370
two remotes or you can fork it as well Those are gonna be the two ways that I

65
00:02:38.370 --> 00:02:38.569
would

66
00:02:38.569 --> 00:02:42.365
uh decide to do this but please please please please please make sure that this

67
00:02:42.365 --> 00:02:42.618
repo

68
00:02:42.618 --> 00:02:45.943
is private That's the big thing cause some of y'all are gonna mess it up Some of

69
00:02:45.943 --> 00:02:46.139
y'all

70
00:02:46.139 --> 00:02:52.277
are gonna mess it up So um now what we need to do is we need to try um and uh

71
00:02:52.277 --> 00:02:52.569
actually

72
00:02:52.569 --> 00:02:57.350
run this code base So we want to make sure that we have everything installed So

73
00:02:57.350 --> 00:02:57.649
you

74
00:02:57.649 --> 00:03:03.111
know for this we want to be on Python 11 3.11 Python uh so you should be able to

75
00:03:03.111 --> 00:03:03.399
see

76
00:03:03.399 --> 00:03:08.171
your your version here 3.103 11 either of those work Just don't go up higher We

77
00:03:08.171 --> 00:03:08.469
don't

78
00:03:08.469 --> 00:03:12.271
want to use Python 3.13 because we are going to be using some libraries later on

79
00:03:12.271 --> 00:03:12.508
that

80
00:03:12.508 --> 00:03:17.290
are incompatible with Python 3.13 So use 3.10 or 3.11 Those are going to be the

81
00:03:17.290 --> 00:03:17.588
ones

82
00:03:17.588 --> 00:03:21.341
that are going to be the most effective So now the the next thing we need to do

83
00:03:21.341 --> 00:03:21.550
is

84
00:03:21.550 --> 00:03:26.659
we need to set up a Python environment Right So let's go ahead and set up a

85
00:03:26.659 --> 00:03:26.960
Python

86
00:03:26.960 --> 00:03:32.219
environment which uh you can do with Python-MVNV like this This is gonna set up

87
00:03:32.219 --> 00:03:32.569
a

88
00:03:32.569 --> 00:03:36.469
new Python environment and then you want to use source right There's uh it will

89
00:03:36.469 --> 00:03:36.729
show

90
00:03:36.729 --> 00:03:39.930
you how to do this on Windows if you're on Windows as well So then you can

91
00:03:39.930 --> 00:03:40.118
source

92
00:03:40.368 --> 00:03:43.984
And you'll notice here you should see this like VNV This means that now we're in

93
00:03:43.984 --> 00:03:44.210
the

94
00:03:44.210 --> 00:03:49.131
activated Python environment So now the next thing we need to do is just pip

95
00:03:49.131 --> 00:03:49.460
install

96
00:03:50.288 --> 00:03:54.722
Requirements So if you look at the codebase uh the requirements that we are

97
00:03:54.722 --> 00:03:55.038
installing

98
00:03:55.199 --> 00:04:03.046
OpenAI PubNub Gina 2 Python.M Subase UVI corn and FAST API are gonna be the

99
00:04:03.046 --> 00:04:03.569
requirements

100
00:04:03.569 --> 00:04:08.952
that we are installing All right Amazing So now we have that working So now what

101
00:04:08.952 --> 00:04:09.288
we

102
00:04:09.288 --> 00:04:14.518
need to do is we got to make sure that our environment is copied over So you see

103
00:04:14.518 --> 00:04:14.808
how

104
00:04:14.808 --> 00:04:23.157
it says CP.example.v.example to v So now you'll see in the ENV we need to go and

105
00:04:23.157 --> 00:04:23.649
actually

106
00:04:23.649 --> 00:04:29.022
get all of these keys right So let's go ahead and get the OpenAI key first right

107
00:04:29.022 --> 00:04:29.338
So

108
00:04:29.338 --> 00:04:33.835
that's gonna be the um the first one that we want to actually get Let's go to

109
00:04:33.835 --> 00:04:34.100
our

110
00:04:34.100 --> 00:04:37.939
details page so we can go to credentials and then you want to hit activate here

111
00:04:37.939 --> 00:04:38.178
on

112
00:04:38.178 --> 00:04:38.819
OpenAI

113
00:04:39.338 --> 00:04:43.167
And then here is your API key for OpenAI and then you can copy it So this is

114
00:04:43.167 --> 00:04:43.379
going

115
00:04:43.379 --> 00:04:46.528
to be on Data Expert you just got to go to the the program detail page

116
00:04:47.088 --> 00:04:52.878
And then we can put this guy in So that's our open AI um API key Fantastic right

117
00:04:52.878 --> 00:04:53.199
Now

118
00:04:53.209 --> 00:04:58.136
we need to do Superbase and Pubnub and then we will be off to the races So when

119
00:04:58.136 --> 00:04:58.410
you

120
00:04:58.410 --> 00:05:01.941
go to PubNub you need to make an account right And it should all of this should

121
00:05:01.941 --> 00:05:02.149
be

122
00:05:02.149 --> 00:05:06.611
free So then what you can do is you can make a new application I have one here

123
00:05:06.611 --> 00:05:06.858
called

124
00:05:06.858 --> 00:05:09.871
the Test uh that we're going to be working with You also have my data expert one

125
00:05:09.871 --> 00:05:10.048
This

126
00:05:10.048 --> 00:05:13.362
is the one that actually does real this is the one that's tied to like the

127
00:05:13.362 --> 00:05:13.569
actual

128
00:05:13.569 --> 00:05:17.413
real-time grading That shows you like all the stack that we're using here is the

129
00:05:17.413 --> 00:05:17.670
same

130
00:05:17.670 --> 00:05:21.241
stack that I used to build AI applications within Data Expert as well like the

131
00:05:21.241 --> 00:05:21.480
auto

132
00:05:21.480 --> 00:05:24.876
grading and everything else like that So we're gonna create a keyset and I'm

133
00:05:24.876 --> 00:05:25.119
just

134
00:05:25.119 --> 00:05:29.147
gonna uh we're gonna make sure to have this be a testing keyset because um if

135
00:05:29.147 --> 00:05:29.399
you

136
00:05:29.399 --> 00:05:32.721
do production I think they're gonna charge you So we're gonna call this learning

137
00:05:32.721 --> 00:05:32.959
we're

138
00:05:32.959 --> 00:05:38.397
just gonna call this the learning keyset cause we are learning here Right So uh

139
00:05:38.397 --> 00:05:38.759
we'll

140
00:05:38.759 --> 00:05:42.474
say like essentially everything here like you know we definitely don't want to

141
00:05:42.474 --> 00:05:42.759
use

142
00:05:42.759 --> 00:05:46.153
US East right Because they they're gonna go down I mean it doesn't matter what

143
00:05:46.153 --> 00:05:46.379
what

144
00:05:46.480 --> 00:05:50.723
what what region you use Uh but you have to pick these Uh I'm just gonna use US

145
00:05:50.723 --> 00:05:50.959
West

146
00:05:51.129 --> 00:05:56.917
US West um one day uh retention is fine and then our message persistence is one

147
00:05:56.917 --> 00:05:57.278
day

148
00:05:57.319 --> 00:06:01.271
it doesn't matter All of that is just uh we're not holding on to long running

149
00:06:01.271 --> 00:06:01.519
chat

150
00:06:01.519 --> 00:06:06.846
messages So now we have our key here right So now this is gonna give us our

151
00:06:06.846 --> 00:06:07.160
publish

152
00:06:07.160 --> 00:06:11.692
key and our subscribe key that we can work with right So these are the two keys

153
00:06:11.692 --> 00:06:11.959
that

154
00:06:11.959 --> 00:06:16.483
we need to copy So I'm gonna copy this publish key and then you'll see we have

155
00:06:16.483 --> 00:06:16.750
Pubnub

156
00:06:16.750 --> 00:06:21.314
pub publish key needs to be set here And we have our subscribe key which needs

157
00:06:21.314 --> 00:06:21.600
to

158
00:06:21.600 --> 00:06:27.170
be set here All right So now we are set with Pubnub Pubnub is gonna be what we

159
00:06:27.170 --> 00:06:27.480
use

160
00:06:27.480 --> 00:06:32.362
for real-time chat and real-time communication Um in this application So PubNub

161
00:06:32.362 --> 00:06:32.769
is

162
00:06:32.769 --> 00:06:37.292
a really really cool service Uh it's like a Q It's like it's like if Kafka was

163
00:06:37.292 --> 00:06:37.559
very

164
00:06:37.649 --> 00:06:42.234
very very very very easy to use That's what Pubnub is And so um next up we got

165
00:06:42.234 --> 00:06:42.488
to

166
00:06:42.488 --> 00:06:46.772
go to Superbase So in Superbase uh you want to go ahead and create uh we can go

167
00:06:46.772 --> 00:06:47.009
ahead

168
00:06:47.009 --> 00:06:51.004
and create like a new organization and I'm just gonna call this data expert

169
00:06:51.004 --> 00:06:51.290
student

170
00:06:51.488 --> 00:06:56.267
right And uh just make sure to never pay them So just always $0 we're just gonna

171
00:06:56.267 --> 00:06:56.548
hit

172
00:06:56.548 --> 00:06:57.009
create

173
00:06:58.540 --> 00:07:03.828
So this is gonna create a new organization Um so now we have our project name uh

174
00:07:03.828 --> 00:07:04.139
then

175
00:07:04.139 --> 00:07:08.662
you have to like put in your password right Like whatever you wanna put in as a

176
00:07:08.662 --> 00:07:08.928
password

177
00:07:08.988 --> 00:07:10.528
I'm just gonna put in um

178
00:07:14.988 --> 00:07:18.819
There we go I'm gonna copy that password we're gonna create a new project

179
00:07:22.139 --> 00:07:28.514
So this is gonna create a project OK amazing So now we have our data expert um

180
00:07:28.514 --> 00:07:28.889
uh

181
00:07:28.889 --> 00:07:32.775
project here And then what we need to be looking at is we need to be able to get

182
00:07:32.775 --> 00:07:32.980
our

183
00:07:32.980 --> 00:07:38.911
keys right That's the main thing that we're looking at here So if you go to um

184
00:07:38.911 --> 00:07:39.259
uh

185
00:07:39.410 --> 00:07:43.394
is it explore storage I think it's explore storage No it's not there Where do

186
00:07:43.394 --> 00:07:43.660
you

187
00:07:43.660 --> 00:07:45.819
get the API keys Just give me one second y'all

188
00:07:46.459 --> 00:07:51.493
Say explore off No OK there's there's definitely OK give me one second Oh it's

189
00:07:51.493 --> 00:07:51.829
just

190
00:07:51.829 --> 00:07:56.459
right here Project so then here are our um project and API configurations right

191
00:07:56.459 --> 00:07:56.790
So

192
00:07:56.790 --> 00:08:00.389
we have our API key and we have our project URL These are the two things that we

193
00:08:00.389 --> 00:08:00.588
want

194
00:08:00.588 --> 00:08:05.311
to copy So we're going to copy the project URL and we have our project URL and

195
00:08:05.311 --> 00:08:05.588
then

196
00:08:05.588 --> 00:08:11.113
we're going to copy our API key and this is gonna be in our super base key So

197
00:08:11.113 --> 00:08:11.420
now

198
00:08:11.548 --> 00:08:16.101
all of our passwords are set up and ready to run So now let's go ahead and

199
00:08:16.101 --> 00:08:16.369
actually

200
00:08:16.369 --> 00:08:20.652
try to run this bad boy Let's go back to the um example here and you'll see we

201
00:08:20.652 --> 00:08:20.889
have

202
00:08:20.889 --> 00:08:27.312
this last command here this UVI UVI corn that's gonna run it So now uh this is

203
00:08:27.312 --> 00:08:27.689
now

204
00:08:27.689 --> 00:08:31.468
running exactly the way we would want Here let me terminate this real quick Now

205
00:08:31.468 --> 00:08:31.720
uh

206
00:08:31.730 --> 00:08:36.564
this is gonna be uh running here and you'll notice uh if you click on that link

207
00:08:36.564 --> 00:08:36.849
it

208
00:08:36.849 --> 00:08:44.708
says it's running here at 1.27127.0.0.1 uh port8000 So this is our server it's

209
00:08:44.708 --> 00:08:45.269
running

210
00:08:45.469 --> 00:08:49.460
right Uh one of the things you'll notice here is OK we have like our LinkedIn

211
00:08:49.460 --> 00:08:49.710
app

212
00:08:49.719 --> 00:08:55.507
and then it'll say like um er message uh could not find table public items in

213
00:08:55.507 --> 00:08:55.869
the

214
00:08:55.869 --> 00:09:02.113
schema So uh the problem here is that we haven't created the public items uh

215
00:09:02.113 --> 00:09:02.529
table

216
00:09:02.830 --> 00:09:07.470
So let's go back to Superbase and create that So we're gonna say create table

217
00:09:07.470 --> 00:09:07.779
items

218
00:09:08.149 --> 00:09:13.701
All right And then remember this is a post-grass database So we can say Uh ID

219
00:09:13.701 --> 00:09:14.048
serial

220
00:09:14.048 --> 00:09:19.009
primary key So this is just like a an auto increment and we have content

221
00:09:19.558 --> 00:09:20.408
um text

222
00:09:21.899 --> 00:09:26.570
And then uh let's just have that be the table for now So let's go ahead and run

223
00:09:26.570 --> 00:09:26.830
selected

224
00:09:28.349 --> 00:09:32.606
OK great Now let's just insert one row insert into items and then we're gonna

225
00:09:32.606 --> 00:09:32.889
add

226
00:09:32.889 --> 00:09:33.428
um

227
00:09:34.029 --> 00:09:39.027
Uh we'll say I or say content and then we're gonna say values I'm gonna say

228
00:09:39.027 --> 00:09:39.340
hello

229
00:09:39.340 --> 00:09:43.923
world So we're just gonna add one row of data into our database into our very

230
00:09:43.923 --> 00:09:44.210
very

231
00:09:44.210 --> 00:09:49.470
simple database So now if we go back to our AI application and we when we

232
00:09:49.470 --> 00:09:49.798
refresh

233
00:09:49.969 --> 00:09:54.691
See now now it's showing our actual data So that means that like uh this page is

234
00:09:54.691 --> 00:09:54.969
ready

235
00:09:54.969 --> 00:09:58.590
to go That means that your super-based connection is working and this page is

236
00:09:58.590 --> 00:09:58.849
ready

237
00:09:58.849 --> 00:10:03.364
to go So we want to test the other pages to make sure everything else is working

238
00:10:03.364 --> 00:10:03.629
So

239
00:10:03.719 --> 00:10:08.366
uh you can go to another page here called Ping Pong So ping pong is another way

240
00:10:08.366 --> 00:10:08.639
that

241
00:10:08.639 --> 00:10:13.251
we can test if Pubnub is working which is our real-time messaging system So we

242
00:10:13.251 --> 00:10:13.558
can

243
00:10:13.558 --> 00:10:18.669
hit connect to Pubnub and then we say send ping and then it should send Pong

244
00:10:18.669 --> 00:10:18.989
back

245
00:10:19.149 --> 00:10:23.403
right So you can send a ping and then it will send Pong back That's just the uh

246
00:10:23.403 --> 00:10:23.639
that's

247
00:10:23.639 --> 00:10:28.128
how we know that it's actually working So that is gonna be great And then the

248
00:10:28.128 --> 00:10:28.408
last

249
00:10:28.408 --> 00:10:32.066
thing that we want to check is we want to go to slash chat And so you should

250
00:10:32.066 --> 00:10:32.269
have

251
00:10:32.269 --> 00:10:38.266
a chat interface here and we can say like um how are you doing today chat GPT

252
00:10:38.266 --> 00:10:38.619
right

253
00:10:38.719 --> 00:10:39.889
And we can um ask it

254
00:10:41.308 --> 00:10:45.124
Say hello I'm a computer programmer here to help How can I assist you So if you

255
00:10:45.124 --> 00:10:45.349
have

256
00:10:45.349 --> 00:10:52.149
all of that working then uh we are pretty much ready to go in terms of getting

257
00:10:52.149 --> 00:10:52.548
all

258
00:10:52.548 --> 00:10:57.444
of our application up and running and I'm really excited for you guys to uh work

259
00:10:57.444 --> 00:10:57.750
with

260
00:10:57.750 --> 00:11:03.135
me on this So I guess the last piece actually is we need to um set this up on

261
00:11:03.135 --> 00:11:03.418
render

262
00:11:03.590 --> 00:11:07.669
So render is gonna be the last piece of this So let's let's go over a render

263
00:11:07.669 --> 00:11:07.908
real

264
00:11:07.908 --> 00:11:12.924
quick So um OK so in render you're gonna go ahead and create uh create a project

265
00:11:12.924 --> 00:11:13.219
here

266
00:11:13.219 --> 00:11:17.851
and um 00 yeah So I already have a project set up because if you don't pay you

267
00:11:17.851 --> 00:11:18.109
can

268
00:11:18.109 --> 00:11:22.647
only have one project which is totally fine So here's our project and um here's

269
00:11:22.647 --> 00:11:22.950
my

270
00:11:22.950 --> 00:11:30.550
AI application um as my project right So what we can do is we can go into um so

271
00:11:30.550 --> 00:11:30.950
this

272
00:11:30.950 --> 00:11:35.269
is gonna allow us to deploy into the cloud Uh one second Uh there we go

273
00:11:35.779 --> 00:11:38.279
Um one second So we have our settings So like

274
00:11:39.019 --> 00:11:42.182
when you go to settings this is where uh you're gonna have a bunch of settings

275
00:11:42.182 --> 00:11:42.379
that

276
00:11:42.379 --> 00:11:47.536
you're gonna need to set in order for this to work right So um you have your

277
00:11:47.536 --> 00:11:47.840
name

278
00:11:48.058 --> 00:11:52.810
uh then you have uh like your region which is fine We don't need to update those

279
00:11:52.810 --> 00:11:53.090
uh

280
00:11:53.178 --> 00:11:56.549
like either west east whatever whatever's closest to you is probably the best

281
00:11:56.549 --> 00:11:56.808
option

282
00:11:56.960 --> 00:12:00.241
Do not change the instant type otherwise it's gonna ask for a credit card Then

283
00:12:00.241 --> 00:12:00.460
you

284
00:12:00.460 --> 00:12:04.317
have your repository So what I want to do is I want to edit this repository

285
00:12:04.317 --> 00:12:04.558
Because

286
00:12:04.558 --> 00:12:11.542
I want to connect to the exactly repository right OK So you see I don't actually

287
00:12:11.542 --> 00:12:11.979
have

288
00:12:11.979 --> 00:12:17.787
um Uh the exactly configured right So we need to go to configure account and I

289
00:12:17.787 --> 00:12:18.149
need

290
00:12:18.149 --> 00:12:22.647
to install render on exactly And then I'm just gonna only select a certain

291
00:12:22.647 --> 00:12:22.969
repository

292
00:12:22.969 --> 00:12:27.104
here and I'm gonna select the AI engineering boot camp right So now this is

293
00:12:27.104 --> 00:12:27.379
gonna

294
00:12:27.379 --> 00:12:33.282
give um this is gonna give uh render the ability to connect to this repo and uh

295
00:12:33.282 --> 00:12:33.629
we

296
00:12:33.629 --> 00:12:35.029
have the permissions for this repo

297
00:12:36.029 --> 00:12:40.567
OK great So now uh let's go back into here We can edit this and we should be

298
00:12:40.567 --> 00:12:40.820
able

299
00:12:40.820 --> 00:12:45.438
to see OK see now here is the here's the repository and we want to just deploy

300
00:12:45.438 --> 00:12:45.710
the

301
00:12:45.710 --> 00:12:47.279
main branch OK

302
00:12:50.879 --> 00:12:53.308
Great So now this is gonna be deploying

303
00:12:54.090 --> 00:12:58.121
Deploy deploy deploy deploy deploy And uh if you are overwhelmed by this stuff

304
00:12:58.121 --> 00:12:58.408
know

305
00:12:58.408 --> 00:13:03.887
that like we are here to help and that like after like this setup piece is a

306
00:13:03.887 --> 00:13:04.210
little

307
00:13:04.210 --> 00:13:11.144
bit like a lot there's a lot going on here But then uh when we move forward into

308
00:13:11.144 --> 00:13:11.529
like

309
00:13:11.529 --> 00:13:14.700
uh the actual AI engineering stuff that we will be covering in the lab today

310
00:13:16.058 --> 00:13:19.913
That's when you're gonna be happy And like I will show you like I just set up

311
00:13:19.913 --> 00:13:20.139
like

312
00:13:20.139 --> 00:13:25.066
so much stuff that we will be able to use So after you so now we connected to

313
00:13:25.066 --> 00:13:25.340
the

314
00:13:25.340 --> 00:13:28.708
right repo and we are going to be deploying from the main branch then you have

315
00:13:28.708 --> 00:13:28.918
like

316
00:13:28.918 --> 00:13:30.259
your you know your username

317
00:13:31.019 --> 00:13:35.410
Um so other things that you're gonna need to do is you need to set the build

318
00:13:35.410 --> 00:13:35.668
command

319
00:13:35.859 --> 00:13:41.235
The build command in our case is just PI installR requirements.txt Good to go

320
00:13:41.235 --> 00:13:41.619
And

321
00:13:41.619 --> 00:13:44.941
then the start command is the same thing except the only difference here instead

322
00:13:44.941 --> 00:13:45.178
of

323
00:13:45.178 --> 00:13:51.899
like port 8000 you need to do port uh dollar port because render picks the port

324
00:13:51.899 --> 00:13:52.320
And

325
00:13:52.320 --> 00:13:56.663
so we want render to pick the best port for us So that's the only difference is

326
00:13:56.663 --> 00:13:56.918
like

327
00:13:56.918 --> 00:14:01.615
you have to change this to dollar port instead of like you'll notice in our run

328
00:14:01.615 --> 00:14:01.908
command

329
00:14:02.119 --> 00:14:07.785
we actually used um port 8000 right You see how like in our command we used port

330
00:14:07.785 --> 00:14:08.119
8000

331
00:14:08.200 --> 00:14:12.320
So you want to use port dollar port and that will be uh the way to do things

332
00:14:13.009 --> 00:14:18.740
And um so essentially that is everything that you need to get up and running And

333
00:14:18.740 --> 00:14:19.099
then

334
00:14:19.099 --> 00:14:25.136
ultimately this will uh it will create um a render page like this where you'll

335
00:14:25.136 --> 00:14:25.538
notice

336
00:14:25.538 --> 00:14:31.866
like if we go to our like deploy OK so here's our logs And um OK so the server

337
00:14:31.866 --> 00:14:32.200
is

338
00:14:32.259 --> 00:14:33.259
it's running right now Uh

339
00:14:33.779 --> 00:14:38.345
it's just deploying right now because it built cause I I changed the repo And

340
00:14:38.345 --> 00:14:38.649
now

341
00:14:38.649 --> 00:14:42.753
it's gonna be uh uh it it should be up and running here in just a second see it

342
00:14:42.753 --> 00:14:42.969
says

343
00:14:42.969 --> 00:14:48.032
your app is almost live So now you'll see we have uh we have this working and

344
00:14:48.032 --> 00:14:48.330
then

345
00:14:48.330 --> 00:14:53.239
I can also go to the chat right And you'll see like hey how is it going

346
00:14:55.340 --> 00:15:01.010
Oh see the OpenAI is not configured So we need to go back to our ENB file So in

347
00:15:01.010 --> 00:15:01.308
our

348
00:15:01.469 --> 00:15:05.874
I forgot about that So we need to go set the environment up right For um oh yeah

349
00:15:05.874 --> 00:15:06.119
see

350
00:15:06.158 --> 00:15:09.933
we only have our superbase keys here So we need to actually edit this and we

351
00:15:09.933 --> 00:15:10.168
need

352
00:15:10.168 --> 00:15:14.707
to add our other keys right So let's go ahead and add a new variable So we can

353
00:15:14.707 --> 00:15:14.960
say

354
00:15:14.960 --> 00:15:16.769
open AI API key

355
00:15:17.428 --> 00:15:22.057
Oh can we do add from an N OK let's just uh yeah let's just do it from the dot

356
00:15:22.057 --> 00:15:22.288
EMV

357
00:15:22.288 --> 00:15:26.469
then and we will do it that way So we will copy our EMV right So we'll just copy

358
00:15:26.469 --> 00:15:26.690
all

359
00:15:26.690 --> 00:15:31.197
of these guys and we're gonna add all these guys in and we're gonna say add

360
00:15:31.197 --> 00:15:31.479
variables

361
00:15:32.779 --> 00:15:38.125
OK so now we have like a duplicate superbase uh OK so let's delete this guy And

362
00:15:38.125 --> 00:15:38.440
then

363
00:15:38.440 --> 00:15:42.972
we have uh we have the two superbase guys So um I actually don't want these guys

364
00:15:42.972 --> 00:15:43.239
I

365
00:15:43.239 --> 00:15:47.269
want the old super base that's fine So um save rebuild and deploy

366
00:15:47.798 --> 00:15:50.109
There are some errors above try to fix them

367
00:15:50.639 --> 00:15:51.639
What does it not like

368
00:15:53.759 --> 00:15:55.960
Duplicate duplicate key is not allowed

369
00:15:57.038 --> 00:15:57.529
Yeah

370
00:15:58.908 --> 00:16:03.830
That makes sense because um OK can we just delete these guys Save and rebuild

371
00:16:05.009 --> 00:16:08.793
And you just can't like delete them OK one second Let me refresh this my bad

372
00:16:08.793 --> 00:16:09.029
Like

373
00:16:09.029 --> 00:16:12.791
that was that was silly of me Let's just add them 11 at a time I guess like I

374
00:16:12.791 --> 00:16:12.989
was

375
00:16:12.989 --> 00:16:16.351
being silly For you you'll be able to add them that way But OK so we're gonna

376
00:16:16.351 --> 00:16:16.548
say

377
00:16:16.548 --> 00:16:21.007
open AI API key and then let's go back here and uh actually copy this You guys

378
00:16:21.007 --> 00:16:21.269
should

379
00:16:21.269 --> 00:16:27.209
be able to do it the the the fast way like that because um you are uh like

380
00:16:27.209 --> 00:16:27.538
actually

381
00:16:27.668 --> 00:16:32.403
like you don't have existing environment So let's go back here and then we can

382
00:16:32.403 --> 00:16:32.719
say

383
00:16:32.719 --> 00:16:37.149
open AI API key We're gonna add a new variable and then we have

384
00:16:37.710 --> 00:16:43.008
we have Pubnub right We have the Pubnub pub pubnubub key and then this has its

385
00:16:43.008 --> 00:16:43.340
own

386
00:16:43.509 --> 00:16:44.379
value here

387
00:16:46.908 --> 00:16:53.299
And then we have a new key and we have uh oh my bad we have a pub nub uh

388
00:16:53.299 --> 00:16:53.619
subscribe

389
00:16:53.619 --> 00:16:53.969
key

390
00:16:54.879 --> 00:16:56.149
Which is gonna be this guy here

391
00:16:56.899 --> 00:17:00.423
And then we'll be able to add this And that way you should be able to say save

392
00:17:00.423 --> 00:17:00.619
and

393
00:17:00.619 --> 00:17:01.259
redeploy

394
00:17:02.808 --> 00:17:08.041
Save rebuild and deploy So now uh our chat features should be up and running So

395
00:17:08.041 --> 00:17:08.368
thanks

396
00:17:08.368 --> 00:17:13.342
for the um waiting there for the little bit of a snafu there So you can see the

397
00:17:13.342 --> 00:17:13.618
logs

398
00:17:13.618 --> 00:17:18.801
of like um it should be up and like it should trigger a build here in just a

399
00:17:18.801 --> 00:17:19.088
second

400
00:17:19.170 --> 00:17:23.753
Let me move this guy We should be able to like events right Oh yeah deploy

401
00:17:23.753 --> 00:17:24.039
started

402
00:17:24.130 --> 00:17:27.880
So here's the deploy So let's actually step into that deploy to see like what's

403
00:17:27.880 --> 00:17:28.130
actually

404
00:17:28.130 --> 00:17:29.130
happening behind the scenes

405
00:17:29.739 --> 00:17:34.596
So this is our deploy of um the new app with the new environment variables So

406
00:17:34.596 --> 00:17:34.900
you'll

407
00:17:34.900 --> 00:17:39.144
see like the first thing it does is it clones the app from my repo and then it

408
00:17:39.144 --> 00:17:39.380
checks

409
00:17:39.380 --> 00:17:44.684
out the the commit from the main branch So now we have all of the data that is

410
00:17:44.684 --> 00:17:44.979
um

411
00:17:44.979 --> 00:17:49.788
pulled all the code that is from our um codebase the the same as this codebase

412
00:17:49.788 --> 00:17:50.088
here

413
00:17:50.500 --> 00:17:55.615
And we should be able to have that up and running here in just a second So um

414
00:17:55.615 --> 00:17:55.900
this

415
00:17:55.900 --> 00:17:56.868
is gonna build

416
00:17:58.189 --> 00:17:59.509
Exited with status one

417
00:18:01.160 --> 00:18:01.890
Uh what

418
00:18:04.509 --> 00:18:05.059
Let's see

419
00:18:06.489 --> 00:18:07.219
Deploy

420
00:18:09.078 --> 00:18:13.380
Exist as one because of an internal system failure Can we like rebuild that

421
00:18:14.039 --> 00:18:18.443
Did it like uh like can we deploy again Like what That's this seems like that's

422
00:18:18.443 --> 00:18:18.719
OK

423
00:18:18.799 --> 00:18:21.039
going manually deploy deploy latest commit

424
00:18:21.989 --> 00:18:26.055
Let's try that again I guess that was a renderer That was definitely not on me

425
00:18:26.055 --> 00:18:26.309
there

426
00:18:26.430 --> 00:18:29.741
That was definitely on render to like see what's going on there Let's see if it

427
00:18:29.741 --> 00:18:29.949
will

428
00:18:29.949 --> 00:18:33.939
actually build here now Like it was having a hard time like pulling in my um

429
00:18:34.750 --> 00:18:36.598
Um my my commits so

430
00:18:37.588 --> 00:18:39.229
OK there we go Now it actually worked

431
00:18:40.039 --> 00:18:45.769
It's gonna be uh like pulling in all of the data and we'll be able to um

432
00:18:47.250 --> 00:18:51.433
Like deploy here in just a second We'll give this a second Oh we need to change

433
00:18:51.433 --> 00:18:51.680
that

434
00:18:51.680 --> 00:18:55.438
Python version we need to update the Python version there Uh but that will be

435
00:18:55.438 --> 00:18:55.689
something

436
00:18:55.689 --> 00:18:59.429
we'll update We don't we we can use whatever for the for the first two weeks we

437
00:18:59.429 --> 00:18:59.650
can

438
00:18:59.650 --> 00:19:03.469
use whatever Python version it doesn't matter Um oh yeah it says

439
00:19:04.368 --> 00:19:07.694
there's a way to do that like it says like specify the Python version OK yeah OK

440
00:19:07.694 --> 00:19:07.890
so

441
00:19:07.890 --> 00:19:11.160
now it's installing um Pip just ran Pip install

442
00:19:11.670 --> 00:19:16.066
right saying running build command Pip install So it just um It just installed

443
00:19:16.066 --> 00:19:16.380
all

444
00:19:16.380 --> 00:19:21.263
of the required libraries that we need like OpenAI and um Subase and all that

445
00:19:21.263 --> 00:19:21.588
stuff

446
00:19:21.689 --> 00:19:26.672
right And fast API So uh we should be able to see that up and running here in

447
00:19:26.672 --> 00:19:26.949
just

448
00:19:26.949 --> 00:19:31.907
a second And uh this is gonna be great So you guys got to understand like after

449
00:19:31.907 --> 00:19:32.199
we

450
00:19:32.199 --> 00:19:36.836
have all this set up this is gonna be a very good foundation for us to build

451
00:19:36.836 --> 00:19:37.108
upon

452
00:19:37.608 --> 00:19:42.340
Uh for the rest of this boot camp So bear with me So there we go Build

453
00:19:42.340 --> 00:19:42.618
successful

454
00:19:42.848 --> 00:19:47.269
right So now it's gonna deploy right So now we want it to actually go and deploy

455
00:19:47.269 --> 00:19:47.529
It

456
00:19:47.529 --> 00:19:53.177
will uh be so that we can actually have the chat feature working So um yeah it's

457
00:19:53.177 --> 00:19:53.509
gonna

458
00:19:53.509 --> 00:19:58.244
be really great and really exciting to do this So remember you have to like oh

459
00:19:58.244 --> 00:19:58.539
there

460
00:19:58.539 --> 00:20:02.450
we go See now it's running There we go It's running the um running on the port

461
00:20:02.450 --> 00:20:02.680
there

462
00:20:02.959 --> 00:20:06.123
So soon we'll be able to actually click in on this guy Can we actually click in

463
00:20:06.123 --> 00:20:06.309
on

464
00:20:06.309 --> 00:20:06.848
this guy now

465
00:20:07.640 --> 00:20:07.989
Um

466
00:20:09.559 --> 00:20:13.841
Oh see he's actually running right now He's uh is he is is chat working now

467
00:20:13.841 --> 00:20:14.108
Let's

468
00:20:14.108 --> 00:20:15.029
see hey

469
00:20:16.910 --> 00:20:19.420
Not yet not yet cause it needs to uh

470
00:20:21.420 --> 00:20:26.012
It needs to like OK so it just picked up everything and I think now our

471
00:20:26.012 --> 00:20:26.299
application

472
00:20:26.299 --> 00:20:32.170
is available Let's try chat one more time here and be like be like hey chat GPET

473
00:20:33.848 --> 00:20:37.325
Hey look at that Now it's working right So now now now we have this live and

474
00:20:37.325 --> 00:20:37.529
I'll

475
00:20:37.529 --> 00:20:40.067
be able to share this link with you guys This is a link that you can share with

476
00:20:40.067 --> 00:20:40.209
your

477
00:20:40.209 --> 00:20:44.199
friends This is like in production right This is actually in prod

478
00:20:44.979 --> 00:20:45.338
Right

479
00:20:46.809 --> 00:20:47.939
And then what is chat

480
00:20:48.559 --> 00:20:53.422
Uh thanks Chat for very very uh worthless information But like we'll be using

481
00:20:53.422 --> 00:20:53.769
this

482
00:20:53.858 --> 00:20:57.476
uh going forward and then the last thing we wanna check is to make sure that um

483
00:20:57.476 --> 00:20:57.689
uh

484
00:20:57.779 --> 00:20:58.769
the ping pong is working

485
00:20:59.539 --> 00:21:03.871
So I go to uh here connect the pubnub we send a ping and we get a pong back

486
00:21:03.871 --> 00:21:04.098
right

487
00:21:04.180 --> 00:21:09.144
So we get ping pong ping pong right OK So that's working great Um if you can get

488
00:21:09.144 --> 00:21:09.420
this

489
00:21:09.420 --> 00:21:13.338
far amazing Um I'm excited for you guys to uh start this boot camp with me

