WEBVTT

00:00.030 --> 00:01.920
-: Okay, so after you've set up billing

00:01.920 --> 00:03.990
and also you've got your API keys,

00:03.990 --> 00:05.160
the next thing we're gonna have a look at

00:05.160 --> 00:06.600
is the playground's in the top right.

00:06.600 --> 00:08.250
Click on playground, you'll see

00:08.250 --> 00:09.630
that you can pick a project.

00:09.630 --> 00:11.430
I'm gonna go to the default projects

00:11.430 --> 00:13.800
and inside of here on the left, you have prompts,

00:13.800 --> 00:16.560
real-time assistance and text speech.

00:16.560 --> 00:19.020
We're gonna look at the prompt section in detail

00:19.020 --> 00:22.203
so I can specifically pick which type of model I want.

00:23.040 --> 00:25.923
I can give it certain tools, so for example, web search.

00:28.200 --> 00:31.020
And then I can say, you are going to help

00:31.020 --> 00:32.613
with customer support.

00:33.570 --> 00:37.230
And we'll then type on the bottom right

00:37.230 --> 00:38.550
with the chat to prompt.

00:38.550 --> 00:40.920
So I'm gonna say, can you research

00:40.920 --> 00:45.920
the best Mexican restaurant inside of London?

00:47.190 --> 00:49.320
And because we've attached one tool,

00:49.320 --> 00:52.740
which is the web search tool, you can see that the agent

00:52.740 --> 00:55.320
or chat bot is gonna basically go and assist

00:55.320 --> 00:57.090
and search the web and it's found

00:57.090 --> 00:58.500
a bunch of different results.

00:58.500 --> 01:01.590
And these are some things that might be useful.

01:01.590 --> 01:04.890
So you can choose the model, you can choose the tool,

01:04.890 --> 01:07.110
you can set a system message here,

01:07.110 --> 01:09.840
which is basically an instructional message

01:09.840 --> 01:12.060
that you should add to make sure that your chat bots

01:12.060 --> 01:14.850
or your LLM-based requests

01:14.850 --> 01:17.130
have a standardized way of applying.

01:17.130 --> 01:19.740
You can also, in the top right, click on the code

01:19.740 --> 01:21.630
and you can copy this code in lots

01:21.630 --> 01:24.900
of different programming languages such as Curl, Python,

01:24.900 --> 01:27.900
node.js, or as well, you can copy the JSON

01:27.900 --> 01:30.270
and see the output of the response.

01:30.270 --> 01:32.910
I'll also make a note that you can switch seamlessly

01:32.910 --> 01:35.400
between the chat completions API,

01:35.400 --> 01:38.340
and also, you can switch to the responses API.

01:38.340 --> 01:40.050
And you can do that in the top right

01:40.050 --> 01:43.230
and you can see that it keeps roughly everything the same.

01:43.230 --> 01:45.240
If you go to the copy on the code section,

01:45.240 --> 01:46.410
then we get the syntax

01:46.410 --> 01:49.200
for the chat.completions endpoint.

01:49.200 --> 01:51.690
As well as that, if we go back to the responses,

01:51.690 --> 01:55.140
you can have a look at the history of how you created this

01:55.140 --> 01:58.470
and what happened within that 30-day history.

01:58.470 --> 02:00.450
You can also compare, so you can have lots

02:00.450 --> 02:03.720
of different models and you can run these simultaneously.

02:03.720 --> 02:05.670
How are you today?

02:05.670 --> 02:08.790
If you hit command, enter, it will submit the prompt.

02:08.790 --> 02:10.650
And you can also add attachments here.

02:10.650 --> 02:12.870
So you can add a link to image, upload an image,

02:12.870 --> 02:14.370
or upload a file.

02:14.370 --> 02:17.100
So there's lots of things that are useful for this.

02:17.100 --> 02:21.660
I find it's a great place to demo a new use case

02:21.660 --> 02:23.460
or a new part of an application.

02:23.460 --> 02:25.230
You can play around with the prompts,

02:25.230 --> 02:26.700
you can easily change the model

02:26.700 --> 02:27.810
and you can see which type

02:27.810 --> 02:30.180
of model gives you the best response.

02:30.180 --> 02:33.000
As well as that, you can also click on this cog over here

02:33.000 --> 02:36.090
in the middle of the screen, which is a dial icon.

02:36.090 --> 02:39.030
And you can change the temperature, the maximum number

02:39.030 --> 02:42.960
of tokens that the app model can produce, and the top P.

02:42.960 --> 02:45.630
For the temperature, you can think of the temperature

02:45.630 --> 02:47.730
as a controlled randomness.

02:47.730 --> 02:52.080
So layering the results will have less random completions.

02:52.080 --> 02:54.900
If we set the temperature to very high,

02:54.900 --> 02:57.090
then it will produce random results.

02:57.090 --> 03:00.300
The temperature, you will get more deterministic outputs

03:00.300 --> 03:03.510
and standard outputs by having the temperature to zero.

03:03.510 --> 03:05.850
If you have the temperature at two,

03:05.850 --> 03:08.460
the model will be a lot more creative.

03:08.460 --> 03:10.770
You can use this when you are generating copy

03:10.770 --> 03:12.840
or social media text, play around

03:12.840 --> 03:14.580
with the temperature parameter.

03:14.580 --> 03:16.980
And this allows you to easily do that

03:16.980 --> 03:19.590
without doing it inside of code.

03:19.590 --> 03:22.980
You can also output different types of structured data.

03:22.980 --> 03:27.000
So we can output JSON objects or JSON schema,

03:27.000 --> 03:28.770
and you've got some examples here.

03:28.770 --> 03:31.650
Like for example, if we're doing moderation,

03:31.650 --> 03:33.780
we can attach an example of that

03:33.780 --> 03:37.293
and say, the cat sat on the mat,

03:38.250 --> 03:40.380
and you'll see that it actually provides us

03:40.380 --> 03:42.270
with structured data out

03:42.270 --> 03:45.930
via that text.format being the JSON schema.

03:45.930 --> 03:47.190
You can easily switch this back

03:47.190 --> 03:50.790
to text by going into the cog icon and clicking on text.

03:50.790 --> 03:52.380
There are other areas of the playground

03:52.380 --> 03:53.640
that you might want to experiment.

03:53.640 --> 03:56.640
So for example, if you are doing an OpenAI real-time,

03:56.640 --> 03:59.070
a voice to voice agent, you'll want

03:59.070 --> 04:00.720
to look at the real-time agent

04:00.720 --> 04:02.940
and that allows you to add on your microphone.

04:02.940 --> 04:05.400
And then you can start a chat with ChatGPT,

04:05.400 --> 04:07.950
and then ChatGPT will be able to then answer you

04:07.950 --> 04:09.540
and generate questions for you.

04:09.540 --> 04:10.920
So I can click generate

04:10.920 --> 04:14.700
and then the assistant will actually respond in real-time.

04:14.700 --> 04:16.770
So this is something that you can easily do

04:16.770 --> 04:18.600
and test out as well.

04:18.600 --> 04:20.940
I wouldn't recommend looking at the assistance API

04:20.940 --> 04:23.580
because that is going to be deprecated soon.

04:23.580 --> 04:25.890
And then text to speech is a way for you

04:25.890 --> 04:28.170
to basically put in some text

04:28.170 --> 04:31.770
and then OpenAI's backend will create real lifelike speech

04:31.770 --> 04:34.500
for you that you can then use in your applications.

04:34.500 --> 04:36.660
These are all the different things in the playground.

04:36.660 --> 04:38.370
I would suspect that you'll spend a lot

04:38.370 --> 04:40.170
of time in the prompts area

04:40.170 --> 04:42.480
because this is where you will do a lot of the work.

04:42.480 --> 04:44.460
And you can also save your prompts as well.

04:44.460 --> 04:47.040
So after you're done, you can click on the save

04:47.040 --> 04:49.620
and we could say, this is a customer support

04:49.620 --> 04:51.960
plus web search agent.

04:51.960 --> 04:54.180
And you can also allow anyone as well

04:54.180 --> 04:56.460
to have access to that specific prompt.

04:56.460 --> 04:59.520
And then you can share that with someone by.

04:59.520 --> 05:02.160
If you just have this URL, you can see this is the preset

05:02.160 --> 05:03.870
that they would go in the top here.

05:03.870 --> 05:06.120
So that's everything inside of the playground.

05:06.120 --> 05:07.170
In the next video,

05:07.170 --> 05:09.390
we're just gonna have a brief look, all the different areas

05:09.390 --> 05:12.090
of the dashboard and why you might decide to look at those.

05:12.090 --> 05:13.940
Cool, I'll see you in the next video.
