-: Okay, so after you've set up billing
and also you've got your API keys,
the next thing we're gonna have a look at
is the playground's in the top right.
Click on playground, you'll see
that you can pick a project.
I'm gonna go to the default projects
and inside of here on the left, you have prompts,
real-time assistance and text speech.
We're gonna look at the prompt section in detail
so I can specifically pick which type of model I want.
I can give it certain tools, so for example, web search.
And then I can say, you are going to help
with customer support.
And we'll then type on the bottom right
with the chat to prompt.
So I'm gonna say, can you research
the best Mexican restaurant inside of London?
And because we've attached one tool,
which is the web search tool, you can see that the agent
or chat bot is gonna basically go and assist
and search the web and it's found
a bunch of different results.
And these are some things that might be useful.
So you can choose the model, you can choose the tool,
you can set a system message here,
which is basically an instructional message
that you should add to make sure that your chat bots
or your LLM-based requests
have a standardized way of applying.
You can also, in the top right, click on the code
and you can copy this code in lots
of different programming languages such as Curl, Python,
node.js, or as well, you can copy the JSON
and see the output of the response.
I'll also make a note that you can switch seamlessly
between the chat completions API,
and also, you can switch to the responses API.
And you can do that in the top right
and you can see that it keeps roughly everything the same.
If you go to the copy on the code section,
then we get the syntax
for the chat.completions endpoint.
As well as that, if we go back to the responses,
you can have a look at the history of how you created this
and what happened within that 30-day history.
You can also compare, so you can have lots
of different models and you can run these simultaneously.
How are you today?
If you hit command, enter, it will submit the prompt.
And you can also add attachments here.
So you can add a link to image, upload an image,
or upload a file.
So there's lots of things that are useful for this.
I find it's a great place to demo a new use case
or a new part of an application.
You can play around with the prompts,
you can easily change the model
and you can see which type
of model gives you the best response.
As well as that, you can also click on this cog over here
in the middle of the screen, which is a dial icon.
And you can change the temperature, the maximum number
of tokens that the app model can produce, and the top P.
For the temperature, you can think of the temperature
as a controlled randomness.
So layering the results will have less random completions.
If we set the temperature to very high,
then it will produce random results.
The temperature, you will get more deterministic outputs
and standard outputs by having the temperature to zero.
If you have the temperature at two,
the model will be a lot more creative.
You can use this when you are generating copy
or social media text, play around
with the temperature parameter.
And this allows you to easily do that
without doing it inside of code.
You can also output different types of structured data.
So we can output JSON objects or JSON schema,
and you've got some examples here.
Like for example, if we're doing moderation,
we can attach an example of that
and say, the cat sat on the mat,
and you'll see that it actually provides us
with structured data out
via that text.format being the JSON schema.
You can easily switch this back
to text by going into the cog icon and clicking on text.
There are other areas of the playground
that you might want to experiment.
So for example, if you are doing an OpenAI real-time,
a voice to voice agent, you'll want
to look at the real-time agent
and that allows you to add on your microphone.
And then you can start a chat with ChatGPT,
and then ChatGPT will be able to then answer you
and generate questions for you.
So I can click generate
and then the assistant will actually respond in real-time.
So this is something that you can easily do
and test out as well.
I wouldn't recommend looking at the assistance API
because that is going to be deprecated soon.
And then text to speech is a way for you
to basically put in some text
and then OpenAI's backend will create real lifelike speech
for you that you can then use in your applications.
These are all the different things in the playground.
I would suspect that you'll spend a lot
of time in the prompts area
because this is where you will do a lot of the work.
And you can also save your prompts as well.
So after you're done, you can click on the save
and we could say, this is a customer support
plus web search agent.
And you can also allow anyone as well
to have access to that specific prompt.
And then you can share that with someone by.
If you just have this URL, you can see this is the preset
that they would go in the top here.
So that's everything inside of the playground.
In the next video,
we're just gonna have a brief look, all the different areas
of the dashboard and why you might decide to look at those.
Cool, I'll see you in the next video.