WEBVTT

1
00:00:01.420 --> 00:00:04.000
In order to consume the key, we need

2
00:00:04.000 --> 00:00:05.760
a NuGet package.

3
00:00:06.560 --> 00:00:10.220
So we will just go to manage NuGet

4
00:00:10.220 --> 00:00:15.320
packages and we need a specific one called

5
00:00:15.320 --> 00:00:19.420
microsoft.agents.ai.openai. This is the main

6
00:00:19.420 --> 00:00:23.420
package of the Microsoft agent when working with

7
00:00:23.420 --> 00:00:24.020
OpenAI.

8
00:00:24.700 --> 00:00:27.460
If you're working with something else, you will

9
00:00:27.460 --> 00:00:30.460
take that away and you get the more

10
00:00:30.460 --> 00:00:31.400
raw package.

11
00:00:32.300 --> 00:00:36.180
But since we are using OpenAI-based setups,

12
00:00:36.520 --> 00:00:37.660
we will use this.

13
00:00:38.200 --> 00:00:40.560
As of this recording, these are pre-releases.

14
00:00:40.940 --> 00:00:44.400
If you see it after Q1 of 2026,

15
00:00:44.580 --> 00:00:47.100
they're probably not pre-releases anymore and you

16
00:00:47.100 --> 00:00:48.760
can get them without.

17
00:00:49.440 --> 00:00:51.380
But in our case, we need to have

18
00:00:51.380 --> 00:00:52.420
the pre-release on.

19
00:00:54.040 --> 00:00:55.680
Let's instal the package.

20
00:00:59.320 --> 00:01:05.140
And we now have access to OpenAI and

21
00:01:05.140 --> 00:01:05.860
the agent framework.

22
00:01:06.940 --> 00:01:10.540
But the agent framework itself will not make

23
00:01:10.540 --> 00:01:11.120
the connection.

24
00:01:11.340 --> 00:01:15.520
That would actually be a NuGet package called

25
00:01:15.520 --> 00:01:17.820
OpenAI, which is underneath here.

26
00:01:19.080 --> 00:01:20.980
And that is what we're going to do

27
00:01:20.980 --> 00:01:21.340
here.

28
00:01:21.540 --> 00:01:24.120
So we're going to write OpenAI client.

29
00:01:27.640 --> 00:01:32.140
Let's call it client and NuUp one of

30
00:01:32.140 --> 00:01:34.480
these and the only thing it needs is

31
00:01:34.480 --> 00:01:35.440
an API key.

32
00:01:37.960 --> 00:01:42.880
So now we have our connection directly to

33
00:01:42.880 --> 00:01:46.520
OpenAI and we could have used this now

34
00:01:47.060 --> 00:01:51.240
in order to use their various systems in

35
00:01:51.240 --> 00:01:53.400
order to just work.

36
00:01:54.060 --> 00:01:57.340
But we are going to use the agent

37
00:01:57.340 --> 00:01:58.600
framework on top.
