1
00:00:00,000 --> 00:00:05,000
So guys, we are going to continue the discussion of building the simple LM application using LCL.

2
00:00:05,000 --> 00:00:08,000
Now in this video we are going to talk about Lang serve.

3
00:00:08,000 --> 00:00:08,000
Right.

4
00:00:08,000 --> 00:00:11,000
And what other things we have learned in the past couple of videos.

5
00:00:11,000 --> 00:00:17,000
We are going to probably deploy that entire Lang application as Rest APIs.

6
00:00:18,000 --> 00:00:23,000
So here when I say deploy Lang chain Runnables and chain as Rest API, that basically means how with

7
00:00:23,000 --> 00:00:29,000
the help of Lang serve, we will be able to create Rest APIs, see deployment parts and all where to

8
00:00:29,000 --> 00:00:30,000
deploy, how to deploy.

9
00:00:30,000 --> 00:00:32,000
I will be talking about that in the upcoming videos.

10
00:00:32,000 --> 00:00:39,000
But here, before doing that specific deployment, how you can convert this entire Lang chain, complete

11
00:00:39,000 --> 00:00:42,000
chains and runnables as Rest API is super important.

12
00:00:42,000 --> 00:00:48,000
Okay, so for this, uh, when we are using Lang serve, this is basically integrated with fast API.

13
00:00:48,000 --> 00:00:51,000
So let's go ahead and do this specific coding.

14
00:00:51,000 --> 00:00:55,000
But this is a another amazing module that has been brought by Liang Chen.

15
00:00:55,000 --> 00:01:01,000
And it really makes your application, uh, like it will be very much easier to probably go ahead and

16
00:01:01,000 --> 00:01:02,000
create your entire chain.

17
00:01:02,000 --> 00:01:02,000
Okay.

18
00:01:02,000 --> 00:01:04,000
So I will be discussing about that.

19
00:01:04,000 --> 00:01:09,000
So first of all, what I will do, I will just go ahead and install one more library.

20
00:01:09,000 --> 00:01:12,000
So let's say that I'm in my V and V environment.

21
00:01:12,000 --> 00:01:13,000
So I'll say pip install.

22
00:01:13,000 --> 00:01:18,000
Um and here I will say fast API Okay.

23
00:01:18,000 --> 00:01:20,000
Let me just go ahead and install this.

24
00:01:20,000 --> 00:01:23,000
So I definitely require fast API over here.

25
00:01:23,000 --> 00:01:28,000
So here you can see the requirement is already installed because I have done that particular installation

26
00:01:28,000 --> 00:01:30,000
so that I don't want to waste any time.

27
00:01:30,000 --> 00:01:34,000
So once you do the fast API installation make sure that you update in the requirement dot txt.

28
00:01:34,000 --> 00:01:39,000
Also along with this we will also go ahead and install something called as Uvicorn.

29
00:01:39,000 --> 00:01:42,000
Okay, so this is also one thing that is basically required.

30
00:01:42,000 --> 00:01:44,000
So I will go over here.

31
00:01:44,000 --> 00:01:49,000
Uh, and here you can see requirement already satisfied with respect to Uvicorn also.

32
00:01:49,000 --> 00:01:49,000
Okay.

33
00:01:49,000 --> 00:01:50,000
So this is perfect.

34
00:01:50,000 --> 00:01:54,000
Now let's go ahead and start implementing it as you all remember.

35
00:01:54,000 --> 00:01:57,000
Uh, what all things we have already added so quickly.

36
00:01:58,000 --> 00:02:02,000
Uh, first of all, I will go ahead and import from now I'm using this.py file.

37
00:02:02,000 --> 00:02:08,000
See, this is a different file altogether in the same folder right before we were executing step by

38
00:02:08,000 --> 00:02:10,000
step over here in this particular file.

39
00:02:10,000 --> 00:02:15,000
Simple lm LCL right now in the same folder location that is basics of lang chain.

40
00:02:15,000 --> 00:02:18,000
Here I have created one another file which is called as server dot p y.

41
00:02:18,000 --> 00:02:18,000
Okay.

42
00:02:18,000 --> 00:02:20,000
And here is what we are going to implement.

43
00:02:20,000 --> 00:02:23,000
Everything whatever we have implemented over here.

44
00:02:23,000 --> 00:02:23,000
Right.

45
00:02:23,000 --> 00:02:27,000
And finally we'll be able to see that how the chain API looks like.

46
00:02:27,000 --> 00:02:32,000
So I'll write from fast API import fast API okay.

47
00:02:32,000 --> 00:02:42,000
And then here I will go ahead and write from long chain underscore core dot prompts import chat prompt

48
00:02:42,000 --> 00:02:43,000
template okay.

49
00:02:43,000 --> 00:02:49,000
And similarly from long chain underscore core dot output parser.

50
00:02:49,000 --> 00:02:53,000
We had also used something called as string output parser right.

51
00:02:53,000 --> 00:02:56,000
Chat prompt lit chat prompt template we had used.

52
00:02:56,000 --> 00:02:59,000
We had also used this, uh, string output parser.

53
00:02:59,000 --> 00:03:03,000
And along with this we had also used from lang chain underscore grok.

54
00:03:04,000 --> 00:03:07,000
We have imported chat Grok.

55
00:03:07,000 --> 00:03:10,000
Right along with this we'll go ahead and say import OS.

56
00:03:10,000 --> 00:03:17,000
And then I will also go ahead and write from dot env import load underscore dot env.

57
00:03:17,000 --> 00:03:19,000
We will go ahead and initialize load underscore dot env.

58
00:03:19,000 --> 00:03:27,000
So to load all the environment variables and you know that uh how to get our uh grok API key.

59
00:03:27,000 --> 00:03:31,000
So for that I will go ahead and write grok underscore API underscore key.

60
00:03:31,000 --> 00:03:34,000
This is the variable that name that I'm actually going to create.

61
00:03:34,000 --> 00:03:36,000
And I'll write OS dot get env.

62
00:03:36,000 --> 00:03:41,000
And here will basically be my grok underscore API underscore key okay.

63
00:03:42,000 --> 00:03:45,000
Now quickly I will go ahead and initialize my grok LM model.

64
00:03:45,000 --> 00:03:46,000
So quickly.

65
00:03:46,000 --> 00:03:47,000
Let's go over here.

66
00:03:48,000 --> 00:03:49,000
And you know that.

67
00:03:49,000 --> 00:03:53,000
How did we go ahead and initialize our grok LM model.

68
00:03:53,000 --> 00:03:55,000
So this was it.

69
00:03:55,000 --> 00:03:57,000
So I will just go ahead and copy this entire thing.

70
00:03:57,000 --> 00:03:59,000
Model Chad Grok model this one.

71
00:03:59,000 --> 00:04:01,000
And I'll write it over here.

72
00:04:01,000 --> 00:04:02,000
Right now my model is specifically ready.

73
00:04:02,000 --> 00:04:05,000
And this is what we have learned already in our previous video.

74
00:04:05,000 --> 00:04:09,000
Let me go ahead and import one more library now, which is called as Lang serve.

75
00:04:09,000 --> 00:04:09,000
Okay.

76
00:04:09,000 --> 00:04:14,000
Now before going ahead you need to also install Lang serve right.

77
00:04:14,000 --> 00:04:16,000
And without installing Lang serve it will be of no use.

78
00:04:16,000 --> 00:04:21,000
So since this is a new module, we will again go ahead and right pip install.

79
00:04:21,000 --> 00:04:25,000
And here I'm going to right lang serve okay lang serve.

80
00:04:25,000 --> 00:04:30,000
And with respect to the lang serve I will also give all if you want all the components that is specifically

81
00:04:30,000 --> 00:04:31,000
required.

82
00:04:31,000 --> 00:04:33,000
Otherwise I'll just go ahead and install Lang serve okay.

83
00:04:33,000 --> 00:04:37,000
Okay, so this is for the first time I'm installing because I did not install it.

84
00:04:37,000 --> 00:04:42,000
I wanted to show you, uh, so here you can see I'm having this particular length of 0.222.2 version.

85
00:04:42,000 --> 00:04:43,000
Right.

86
00:04:43,000 --> 00:04:46,000
So once I install it right you can just go ahead and right pip install.

87
00:04:46,000 --> 00:04:50,000
But please make sure that you update in the requirement dot txt okay.

88
00:04:50,000 --> 00:04:54,000
So after installing it over here I've installed the lang so or any libraries that you install.

89
00:04:54,000 --> 00:04:57,000
Please make sure that you update in the Lang sir.

90
00:04:57,000 --> 00:04:59,000
Okay uh sorry requirement dot txt.

91
00:05:00,000 --> 00:05:07,000
Now after importing lang stuff I will quickly go ahead and uh import from lang.

92
00:05:07,000 --> 00:05:13,000
So I will be importing add routes.

93
00:05:13,000 --> 00:05:13,000
Okay.

94
00:05:13,000 --> 00:05:17,000
You need to have a basic idea with respect to fast API.

95
00:05:17,000 --> 00:05:17,000
Okay.

96
00:05:17,000 --> 00:05:22,000
Now this add underscore routes will actually help you to create your APIs.

97
00:05:22,000 --> 00:05:23,000
right?

98
00:05:23,000 --> 00:05:25,000
So now let us go ahead.

99
00:05:25,000 --> 00:05:29,000
And as usual what I will do I will go ahead and create my entire prompt template.

100
00:05:29,000 --> 00:05:35,000
So here the same code, whatever we had in our ipynb file I have copied and pasted it over here.

101
00:05:35,000 --> 00:05:35,000
Right.

102
00:05:35,000 --> 00:05:37,000
This is my system template.

103
00:05:37,000 --> 00:05:39,000
Translate the following into this particular language.

104
00:05:39,000 --> 00:05:41,000
Then chat prompt template user with text.

105
00:05:41,000 --> 00:05:44,000
Okay, then I have already created my model.

106
00:05:44,000 --> 00:05:47,000
I will go ahead and also create my string output parser.

107
00:05:47,000 --> 00:05:48,000
So I will write.

108
00:05:48,000 --> 00:05:51,000
Parser is equal to string output parser.

109
00:05:51,000 --> 00:05:57,000
Okay, now after creating the string output parser let's create chain.

110
00:05:57,000 --> 00:06:01,000
So for creating chain what I need to do I need to combine these three things right.

111
00:06:01,000 --> 00:06:03,000
One is the prompt template.

112
00:06:04,000 --> 00:06:08,000
Another one is the model and the other one is something called as parser.

113
00:06:08,000 --> 00:06:08,000
Okay.

114
00:06:09,000 --> 00:06:11,000
So we'll go ahead and combine this.

115
00:06:11,000 --> 00:06:14,000
And finally we have this app definition that we have.

116
00:06:14,000 --> 00:06:15,000
Okay.

117
00:06:15,000 --> 00:06:20,000
Now for this app definition what I will do is that now we are going to use this add routes.

118
00:06:20,000 --> 00:06:25,000
So if I really want to add any kind of route over here I will go ahead and use this add route.

119
00:06:25,000 --> 00:06:28,000
And inside this add route which is coming from Lang save Lang.

120
00:06:28,000 --> 00:06:34,000
So I have to give my app the first app which I've actually created and still I have not defined the

121
00:06:34,000 --> 00:06:35,000
app also.

122
00:06:35,000 --> 00:06:37,000
So let me just go ahead and define the app.

123
00:06:37,000 --> 00:06:42,000
So I will go ahead and create my app over here app definition.

124
00:06:42,000 --> 00:06:44,000
And I'll say, hey, this will be my first API app.

125
00:06:44,000 --> 00:06:50,000
It is almost like flask, but there is some more additional functionalities that you get in fast API.

126
00:06:50,000 --> 00:06:54,000
But if you have seen this flask tutorials, I think you should be able to understand it.

127
00:06:54,000 --> 00:07:00,000
So I will give my title saying that this is my Lang chain server.

128
00:07:00,000 --> 00:07:00,000
Okay.

129
00:07:01,000 --> 00:07:08,000
And the second parameter that I'm actually going to give is nothing but version is equal to 1.0.

130
00:07:08,000 --> 00:07:12,000
And finally I will also go ahead and give my description.

131
00:07:12,000 --> 00:07:23,000
Description will be nothing, but I'll go ahead and write a simple API server using long chain runnable

132
00:07:23,000 --> 00:07:24,000
interfaces.

133
00:07:25,000 --> 00:07:29,000
Okay, so this, uh, I've actually given it.

134
00:07:29,000 --> 00:07:31,000
So this will basically be my first parameter in this route.

135
00:07:31,000 --> 00:07:32,000
Which app?

136
00:07:32,000 --> 00:07:38,000
I'm actually going to give that second thing I want to give my chain the chain uh, which has the combination

137
00:07:38,000 --> 00:07:43,000
of prompt template, LM model, string output parser, and the third one I have to actually specify

138
00:07:43,000 --> 00:07:43,000
my path.

139
00:07:43,000 --> 00:07:47,000
So here I'm going to specify slash chain as my path okay.

140
00:07:47,000 --> 00:07:50,000
You'll be understanding what exactly this route will basically do.

141
00:07:50,000 --> 00:07:54,000
So here, uh, this is basically adding chain routes.

142
00:07:54,000 --> 00:07:55,000
Okay.

143
00:07:56,000 --> 00:07:57,000
Perfect.

144
00:07:57,000 --> 00:08:01,000
Now it's time that, uh, we can go ahead and execute this.

145
00:08:01,000 --> 00:08:07,000
Uh, so I will write from underscore underscore name underscore underscore is double equal to underscore

146
00:08:07,000 --> 00:08:09,000
underscore main underscore underscore.

147
00:08:09,000 --> 00:08:14,000
This is how we start the entry of the program I will go ahead and import Uvicorn.

148
00:08:14,000 --> 00:08:15,000
Okay.

149
00:08:16,000 --> 00:08:16,000
Uvicorn.

150
00:08:16,000 --> 00:08:20,000
And then I will say Uvicorn dot run.

151
00:08:20,000 --> 00:08:22,000
This is how we run the fast API.

152
00:08:22,000 --> 00:08:25,000
We'll tell the app name I will give the host.

153
00:08:25,000 --> 00:08:29,000
Host will be my localhost okay local host.

154
00:08:29,000 --> 00:08:32,000
And finally I'll also give my port if I want.

155
00:08:32,000 --> 00:08:36,000
So port will be 8000 okay so these are all the information.

156
00:08:36,000 --> 00:08:38,000
Now see what we have exactly done.

157
00:08:38,000 --> 00:08:40,000
We are loading our chat graph model.

158
00:08:40,000 --> 00:08:42,000
Uh here we have created our prompt template.

159
00:08:42,000 --> 00:08:44,000
Then we have created our chain and output parser.

160
00:08:44,000 --> 00:08:46,000
We have created a fast API app.

161
00:08:46,000 --> 00:08:48,000
We have added the route write slash chain.

162
00:08:48,000 --> 00:08:50,000
And finally we are executing this.

163
00:08:50,000 --> 00:08:53,000
So now let's quickly go ahead and execute it okay.

164
00:08:53,000 --> 00:08:55,000
Don't forget to save the file over here.

165
00:08:55,000 --> 00:09:01,000
Now if you remember this particular uh file is present in the location 1.1 Basics of link chain.

166
00:09:01,000 --> 00:09:05,000
So let me just go ahead and write CD 1.1 basics of long chain.

167
00:09:05,000 --> 00:09:08,000
And here I'm just going to write Python serve.py.

168
00:09:08,000 --> 00:09:12,000
This is how you go ahead and exit your execute a fast API app.

169
00:09:12,000 --> 00:09:16,000
Once I execute it, I think it should get executed.

170
00:09:16,000 --> 00:09:20,000
But here I'm getting an error saying that hey pip install se starlet.

171
00:09:20,000 --> 00:09:26,000
Okay, I need this particular dependency so quickly I will go ahead and write it over here.

172
00:09:26,000 --> 00:09:29,000
Okay So quickly I will go ahead and execute this.

173
00:09:30,000 --> 00:09:31,000
Let me do one thing.

174
00:09:31,000 --> 00:09:34,000
Uh, instead of writing it over here, I'll open a new command prompt.

175
00:09:35,000 --> 00:09:35,000
Okay.

176
00:09:35,000 --> 00:09:37,000
And let me write it over here.

177
00:09:37,000 --> 00:09:37,000
Pip install.

178
00:09:37,000 --> 00:09:38,000
SSH.

179
00:09:38,000 --> 00:09:38,000
Starlet.

180
00:09:38,000 --> 00:09:41,000
This is one of the dependencies that we have.

181
00:09:42,000 --> 00:09:48,000
So once I have, uh, written or created the routes, now, what we are going to specifically do over

182
00:09:48,000 --> 00:09:52,000
here is that I will give the entry point and I'll start the execution.

183
00:09:52,000 --> 00:09:52,000
Right.

184
00:09:52,000 --> 00:09:58,000
So first of all, what I will do, I will write if uh underscore underscore name underscore underscore

185
00:09:58,000 --> 00:10:02,000
is double equal to underscore underscore main underscore underscore.

186
00:10:02,000 --> 00:10:08,000
So this is the entry point I will go ahead and import uvicorn okay.

187
00:10:08,000 --> 00:10:12,000
And along with this particular uvicorn uh I will go ahead and write Uvicorn.

188
00:10:13,000 --> 00:10:14,000
Uh, unicorn Unicorn.

189
00:10:16,000 --> 00:10:17,000
Unicorn.

190
00:10:17,000 --> 00:10:18,000
Dot.

191
00:10:18,000 --> 00:10:21,000
Run and app.

192
00:10:21,000 --> 00:10:21,000
Comma.

193
00:10:22,000 --> 00:10:24,000
Host is equal to.

194
00:10:24,000 --> 00:10:28,000
I will give my host as 127 .0.1.

195
00:10:28,000 --> 00:10:33,000
This will be my local host and here I will give my port as 8000.

196
00:10:33,000 --> 00:10:34,000
Okay.

197
00:10:34,000 --> 00:10:37,000
You can also replace this particular values to local host okay.

198
00:10:37,000 --> 00:10:39,000
Now let's go ahead and execute it.

199
00:10:40,000 --> 00:10:44,000
Remember I'm inside this particular folder 1.1 basics of long chain here.

200
00:10:44,000 --> 00:10:47,000
Uh I will just go ahead and write Python serve.py.

201
00:10:48,000 --> 00:10:48,000
Okay.

202
00:10:49,000 --> 00:10:53,000
And once we execute this here you'll be able to see that it is running over here.

203
00:10:53,000 --> 00:10:56,000
Let's click on this particular link okay.

204
00:10:56,000 --> 00:10:59,000
So here is the page that is visible.

205
00:11:00,000 --> 00:11:02,000
Uh right now in the home page nothing is basically visible.

206
00:11:02,000 --> 00:11:06,000
So what I will do I'll just go ahead and write slash docs Once I write slash docs.

207
00:11:06,000 --> 00:11:11,000
So this is what, uh, you know, uh, fast API uses pedantic rules.

208
00:11:11,000 --> 00:11:11,000
Okay.

209
00:11:11,000 --> 00:11:15,000
So that actually gives you all the APIs that is over there.

210
00:11:15,000 --> 00:11:15,000
Okay.

211
00:11:15,000 --> 00:11:18,000
So here, uh, it gives you this entire thing.

212
00:11:18,000 --> 00:11:21,000
You just need to write this particular URL slash docs.

213
00:11:21,000 --> 00:11:23,000
You'll be able to see that I have this chain invoke.

214
00:11:23,000 --> 00:11:24,000
Okay.

215
00:11:24,000 --> 00:11:27,000
Um, here I can pass any values.

216
00:11:27,000 --> 00:11:30,000
Then let's, let's discuss about this, uh, single by single.

217
00:11:30,000 --> 00:11:30,000
Right.

218
00:11:30,000 --> 00:11:36,000
So this basically has created this entire chain configuration, uh, with all the information that I

219
00:11:36,000 --> 00:11:37,000
have over here.

220
00:11:37,000 --> 00:11:38,000
Right.

221
00:11:38,000 --> 00:11:41,000
So, uh, if I just write slash chain, right.

222
00:11:41,000 --> 00:11:43,000
Uh, from that lang serve, you'll be able to see that here.

223
00:11:43,000 --> 00:11:45,000
You have this input schema, right?

224
00:11:45,000 --> 00:11:49,000
Uh, it says that you have to provide the input as string.

225
00:11:49,000 --> 00:11:50,000
Here is your output.

226
00:11:50,000 --> 00:11:52,000
You will be getting in the form of JSON.

227
00:11:52,000 --> 00:11:53,000
Okay.

228
00:11:53,000 --> 00:11:55,000
then you have this invoke function.

229
00:11:55,000 --> 00:11:58,000
Invoke basically means you will provide some value okay.

230
00:11:58,000 --> 00:12:03,000
And based on that value what all values will be providing like language and text okay.

231
00:12:03,000 --> 00:12:07,000
And uh, this is what is the kind of response that you are going to get.

232
00:12:07,000 --> 00:12:08,000
And this is all are there.

233
00:12:08,000 --> 00:12:08,000
Right.

234
00:12:08,000 --> 00:12:13,000
So all this information like let's say I want to go ahead and try out this invoke.

235
00:12:13,000 --> 00:12:13,000
Okay.

236
00:12:13,000 --> 00:12:16,000
So here uh, let's say language is called string.

237
00:12:16,000 --> 00:12:19,000
Uh string and text is equal to string.

238
00:12:19,000 --> 00:12:20,000
This is the request body.

239
00:12:20,000 --> 00:12:25,000
Okay, let me, uh, just go ahead and pass this values over here.

240
00:12:25,000 --> 00:12:25,000
Okay.

241
00:12:25,000 --> 00:12:32,000
So I'll say, hey, language is French and, uh, text is basically hi.

242
00:12:33,000 --> 00:12:39,000
And if I go ahead and execute it, you'll be able to see that it has got executed.

243
00:12:39,000 --> 00:12:41,000
I'm getting the output as salute okay.

244
00:12:42,000 --> 00:12:46,000
So guys, now let's explore more example from this particular documentation.

245
00:12:46,000 --> 00:12:49,000
See I have just created one chain that is slash chain slash invoke.

246
00:12:49,000 --> 00:12:51,000
You can create any number of chains over there.

247
00:12:51,000 --> 00:12:53,000
Let's say I will go ahead and write.

248
00:12:53,000 --> 00:12:53,000
Hello.

249
00:12:54,000 --> 00:12:57,000
My name is Krish okay.

250
00:12:57,000 --> 00:13:00,000
And this is what is the post request that needs to go.

251
00:13:00,000 --> 00:13:06,000
And if I just go ahead and click on execute it here you'll be able to see Bon Jour de la creche.

252
00:13:06,000 --> 00:13:06,000
Right.

253
00:13:06,000 --> 00:13:08,000
This is the output that I'm actually getting.

254
00:13:08,000 --> 00:13:11,000
So this is how you can actually go ahead and create chain.

255
00:13:11,000 --> 00:13:16,000
And along with this documentation, you'll also be seeing that there are some other information like

256
00:13:17,000 --> 00:13:19,000
slash chain slash input schema.

257
00:13:19,000 --> 00:13:24,000
See if I just go ahead and execute this since this is a Get request.

258
00:13:24,000 --> 00:13:32,000
So I'll say slash chain uh slash chain slash input Input schema.

259
00:13:33,000 --> 00:13:35,000
Input underscore schema.

260
00:13:35,000 --> 00:13:37,000
So if I execute it.

261
00:13:37,000 --> 00:13:39,000
So what is the information that I am able to get right.

262
00:13:39,000 --> 00:13:42,000
This is the prompt Im told this is the language.

263
00:13:42,000 --> 00:13:45,000
The text should be a string type and all the information.

264
00:13:45,000 --> 00:13:48,000
Along with this I can also go ahead and see some more information.

265
00:13:48,000 --> 00:13:50,000
So this is with respect to the input schema.

266
00:13:50,000 --> 00:13:54,000
Now how the output schema should look like I can go ahead and hit this URL right.

267
00:13:54,000 --> 00:13:59,000
And that is what is beautiful about, uh, fast API, you know, so I can go ahead and write like this.

268
00:13:59,000 --> 00:14:01,000
I will copy this same thing.

269
00:14:01,000 --> 00:14:03,000
I will go ahead and write it over here.

270
00:14:03,000 --> 00:14:06,000
And let me just go ahead and see my output schema.

271
00:14:07,000 --> 00:14:07,000
Okay.

272
00:14:08,000 --> 00:14:10,000
So this is the entire documentation, right.

273
00:14:10,000 --> 00:14:13,000
Uh, like the swagger documentation we see in fast API.

274
00:14:13,000 --> 00:14:17,000
So here it says that, hey, your string, uh, the output is a string output parse and the type is

275
00:14:17,000 --> 00:14:18,000
string.

276
00:14:18,000 --> 00:14:19,000
That entire information will be seen.

277
00:14:19,000 --> 00:14:21,000
So this is one Post request.

278
00:14:21,000 --> 00:14:23,000
You also have something like batch okay.

279
00:14:23,000 --> 00:14:27,000
You can give the let's let's try this out okay.

280
00:14:27,000 --> 00:14:29,000
So let's try it out over here.

281
00:14:29,000 --> 00:14:35,000
Let's say here I'm going to give language as Hindi I want to convert text into Hindi English into Hindi.

282
00:14:35,000 --> 00:14:36,000
So I'll say hello.

283
00:14:37,000 --> 00:14:40,000
Hello how are you.

284
00:14:40,000 --> 00:14:40,000
Okay.

285
00:14:40,000 --> 00:14:42,000
So I'll go ahead and execute it.

286
00:14:42,000 --> 00:14:44,000
Let's see what kind of output I will get.

287
00:14:44,000 --> 00:14:47,000
So here you can see uh output like Namaste.

288
00:14:48,000 --> 00:14:48,000
Right.

289
00:14:48,000 --> 00:14:49,000
How are you in Hindi.

290
00:14:49,000 --> 00:14:54,000
All the information over here with some more metadata information you are getting so that there is one

291
00:14:54,000 --> 00:14:56,000
more, uh, by default, one more Post request.

292
00:14:56,000 --> 00:14:58,000
When you created slash chain, right.

293
00:14:58,000 --> 00:15:02,000
So many things have got created like slash and slash invoke slash chain slash batch.

294
00:15:03,000 --> 00:15:06,000
And you can also use postman and you can probably use all these things.

295
00:15:06,000 --> 00:15:07,000
Right.

296
00:15:07,000 --> 00:15:11,000
Um, uh, so this is what, uh, you specifically get from this?

297
00:15:11,000 --> 00:15:14,000
Uh, I hope you're able to understand this particular video.

298
00:15:14,000 --> 00:15:17,000
Let me just go ahead and show you with the help of postman also.

299
00:15:17,000 --> 00:15:17,000
Right.

300
00:15:17,000 --> 00:15:22,000
So if you don't know about postman, postman actually helps you to interact with any kind of APIs.

301
00:15:22,000 --> 00:15:22,000
Right.

302
00:15:22,000 --> 00:15:27,000
So let's open this and I will create one get uh, post request, let's say.

303
00:15:27,000 --> 00:15:32,000
So the post request uh, that I really want to get is slash chain slash batch.

304
00:15:32,000 --> 00:15:32,000
Okay.

305
00:15:32,000 --> 00:15:36,000
So here I will say okay, I'll dismiss this.

306
00:15:36,000 --> 00:15:38,000
I'll make it as a Post request.

307
00:15:38,000 --> 00:15:44,000
It is 127 point this the 8000, uh, port address is there.

308
00:15:44,000 --> 00:15:47,000
And here, let me just go ahead and write it over here.

309
00:15:47,000 --> 00:15:49,000
What it is slash n slash batch.

310
00:15:49,000 --> 00:15:49,000
Okay.

311
00:15:49,000 --> 00:15:51,000
Slash chain slash batch.

312
00:15:52,000 --> 00:15:57,000
Now, I know, uh, in my body I have to make this as my raw.

313
00:15:57,000 --> 00:15:58,000
Select my JSON.

314
00:15:58,000 --> 00:15:59,000
Okay?

315
00:15:59,000 --> 00:16:04,000
And here is what I'm actually going to give my entire body right now how my body should look like.

316
00:16:04,000 --> 00:16:06,000
Same this way.

317
00:16:06,000 --> 00:16:07,000
Uh, where is it?

318
00:16:07,000 --> 00:16:08,000
Okay.

319
00:16:08,000 --> 00:16:09,000
This is the Get request okay.

320
00:16:09,000 --> 00:16:11,000
So I just now tried it out, right.

321
00:16:11,000 --> 00:16:16,000
So I will keep this entire is my body in the form of JSON.

322
00:16:16,000 --> 00:16:17,000
I'll paste it over here.

323
00:16:17,000 --> 00:16:19,000
Let's, uh, execute this.

324
00:16:19,000 --> 00:16:24,000
So let me just keep this in string because I need to send it in the form of body.

325
00:16:24,000 --> 00:16:28,000
And once I click on send here you can see invalid JSON body.

326
00:16:28,000 --> 00:16:28,000
Okay.

327
00:16:28,000 --> 00:16:31,000
Let me just remove this I think this is invalid.

328
00:16:32,000 --> 00:16:37,000
Now see once I send it here is what is my output along with my metadata.

329
00:16:37,000 --> 00:16:41,000
So this way also you can go ahead and test each and every request.

330
00:16:41,000 --> 00:16:42,000
And from the postman also you can do this.

331
00:16:42,000 --> 00:16:45,000
You can just go ahead and download postman.

332
00:16:45,000 --> 00:16:47,000
Go ahead and set the post request.

333
00:16:47,000 --> 00:16:52,000
What is the URL and what should be your body right and you'll be able to get it.

334
00:16:52,000 --> 00:16:55,000
So I hope you like this particular video.

335
00:16:55,000 --> 00:16:55,000
You know.

336
00:16:55,000 --> 00:17:00,000
So in this video what all things we basically did, we developed a simple LM application.

337
00:17:00,000 --> 00:17:04,000
First of all I'll try to close this up okay I don't require it more.

338
00:17:04,000 --> 00:17:08,000
First of all, we saw how to develop an LM application with the help of LCL.

339
00:17:08,000 --> 00:17:13,000
Then we also saw how we used Lang server and probably created this entire application in the form of

340
00:17:13,000 --> 00:17:15,000
chains and APIs, right?

341
00:17:15,000 --> 00:17:20,000
That is the most amazing thing because after this, we can take this entire application and we can deploy

342
00:17:20,000 --> 00:17:21,000
it wherever you want.

343
00:17:21,000 --> 00:17:22,000
Okay.

344
00:17:22,000 --> 00:17:26,000
And, uh, in the upcoming videos, you'll also be seeing, you know, in the upcoming modules, you'll

345
00:17:26,000 --> 00:17:31,000
also be seeing that I'll be showing you various deployment mechanisms and techniques.

346
00:17:31,000 --> 00:17:31,000
Right.

347
00:17:31,000 --> 00:17:33,000
So yes, this was it from my side.

348
00:17:33,000 --> 00:17:34,000
I hope you liked this particular video.

349
00:17:34,000 --> 00:17:36,000
I will see you all in the next video.

350
00:17:36,000 --> 00:17:36,000
Thank you.

351
00:17:36,000 --> 00:17:37,000
Take care.

