Welcome to this course!
I'm James, and I'll be your host as we explore the artificial intelligence functionality available via the OpenAI API!
In this course, you'll learn how to use the AI models
available through the OpenAI API to solve a wide range of real-world tasks.
To do this, we'll be using Python code throughout the course, and expect familiarity with a
few Python programming topics like subsetting lists and dictionaries, control flow, and looping.
However, no experience with AI or machine learning is required.
With that, let's dive right in!
OpenAI is a company that researches and develops artificial intelligence systems.
One of their most famous developments is ChatGPT, which is an application that allows users
to communicate with an AI-powered chatbot to ask questions, perform tasks, or generate content.
The OpenAI API allows individuals or organizations to access
and customize any of the models developed and released by OpenAI.
If OpenAI was a car manufacturer, ChatGPT would be their shiny
new sports car that people can walk into a dealership and test drive.
The OpenAI API would be like the system customers could use
to customize and order any car from the manufacturer's catalog.
So what actually is an API?
API stands for Application Programming Interface, and they act as a messenger between software
applications, taking a request to a system and receiving a response containing data or services.
An API is like a waiter in a restaurant; they take our order, or request, communicate it to the kitchen -
the system providing the service - and finally, deliver the food, or response from the system, back to our table.
Many applications interact using APIs; for example, a mobile weather app may send our
location to an API and request the local forecast, which gets returned back to our phones.
We can similarly write code to interact with the OpenAI API and request the use of one of their models.
Our request, in this case, will specify which model we want, the data that we
want the model to use, and any other parameters to customize the model's behavior.
The response, containing the model result, is then returned back to us.
Some of OpenAI's models, such as ChatGPT, can be used from the
web browser, so what's the benefits of accessing them via the API?
If we're looking to streamline our individual workflows using AI, then
a low-setup web browser experience is likely sufficient for our purposes.
However, if we're looking to begin integrating AI into our products, customer experiences, or
business processes, we'll need the flexibility of working with the API using a programming language.
The beauty of making these models available via an API is that software engineers,
developers, or anyone else wanting to integrate AI into products and services, can now
access and implement these models without needing a background in data science or machine learning.
The OpenAI API has enabled the development of powerful new features,
that before, would have required enormous computational resources and data.
In the example shown from DataCamp workspace, we developed a feature where
users can write or fix code by providing an instruction - all built on the OpenAI API.
AI-powered products and services can provide much greater personalization to
customers, so experiences can be tailored to an individual's needs and preferences.
Time to test your understanding!