-: Hey, and in this video you're gonna learn
about some of the core features
that OpenAI provides you with as a developer
so that you get an awareness
about all the different types of capabilities
that you're gonna be able to do when using this API.
For example, some of the core language capabilities
are text generations,
so OpenAI can easily generate text,
you can use the responses API
like you can see on the left here,
and the models range from lightweight to advanced.
You can control parameters
like we were showing you earlier in the Playground,
such as the temperature,
the maximum number of tokens that can be generated,
and also the top-p.
There's also content filtering
and safety measures that are built in.
Secondly, you can extract structured outputs from OpenAI.
This allows you to get predictable JSON response.
This is perfect for doing data extraction
and structured information retrieval,
also enforces the output format
and validates that it is in that structure.
This reduces the post-processing effort that you have to do
and it basically means you can get structured data
from just about anything.
Also, you can use ChatGPT's API
or OpenAI's API to analyze images.
You can provide a prompt with the image URL
or attach the image as Base64 encoded string,
and then you can basically get an output back
directly from OpenAI about that image.
You can also generate images
with OpenAI's API using the dall-e-3 model at the moment,
and you can put in a prompt
and the number of generations you want with n 1
and the size as well of the image.
OpenAI also offers text-to-speech,
so generating real life-like speech
directly from a textual prompt
and also speech-to-text, i.e. transcription.
There are some more advanced features of OpenAI's API,
such as function calling or tools,
and you can basically provide a agent
with a get_weather function,
then the agent is capable of understanding
when to call that tool.
And you can see, for example, in the prompt on the left,
we have this query from the user,
"What's the weather like in Paris today?"
That will likely lead the AI choosing
to use a get_weather tool to answer that user's query.
There are more recent models, which are reasoning models,
these are very good for solving complex problems
and I would recommend having a look at the newer models.
So o3 is the most performant model
at this time of recording.
There is also o4-mini,
which is slightly more cost-efficient.
You have a parameter that allows you
to see on the left-hand side here the ability to choose
how much reasoning effort should be gone into.
There is also embeddings,
which is a way to represent words in a numerical format.
This is useful for semantic search and similarity use cases.
And you can see on the left here, we can take an input,
"The quick brown fox jumps over the lazy dog,"
and then basically we'll produce a series of numbers,
also known as an embedding.
Some of the different types of ways
that you might like to use this
is similarity matching,
dynamically bringing content back,
that's similar to a query,
clustering and classification, knowledge bases,
and RAG, also known as retrieval augmented generation.
There are lots of different things you can do
inside of OpenAI beside the core features,
such as fine-tuning,
so training your own models on your specific data,
running evaluations, or commonly known as evals,
systematically evaluating your model performance,
and also distillation,
so creating smaller, more specialized models,
which helps to reduce the inference cost and the latency.
There's also a bunch of developer resources
that are put into this video,
so feel free to have a look at that
in your journey with OpenAI.
In the next video, we're gonna have a look
at how you can get started.
So creating an account, creating an API key,
and then as well as that, you'll also need
to install the SDK with this pip install openai command.
Cool, I'll see you in the next video.