Using OpenAI APIs: Accessing OpenAI APIs from Python
Generative AI
| Beginner
- 12 videos | 1h 53m 9s
- Includes Assessment
- Earns a Badge
OpenAI application programming interfaces (APIs) represent a groundbreaking leap in the accessibility of state-of-the-art natural language processing (NLP) capabilities. These APIs provide developers with a powerful toolset to integrate advanced language models seamlessly into their applications, products, and services. You will start this course by engaging with OpenAI through the command-line, utilizing the OpenAI APIs. You will learn how to authenticate yourself using API keys when programmatically accessing API endpoints using cURL commands. You will explore how to configure context for past interactions with the model and access both chat completions and legacy completions APIs via their respective endpoints. Moving onto Python, you will install the OpenAI library to create a client object for endpoint access. You will configure the API key and send requests to the chat completions endpoint with prompts in the JSON format. You will also explore the legacy completions API using the same client object. You will be introduced to the diverse range of model offerings from OpenAI and learn how to use those models. Finally, you will configure model parameters to adjust the response from the model. You will learn about the seed parameter to receive deterministic responses and how the system fingerprint helps track infrastructure changes on the server. You will explore various parameters, including Top P and Temperature for controlling creativity, max length, and stop sequences for response length, and frequency and presence penalty for word and topic repetition.
WHAT YOU WILL LEARN
-
Discover the key concepts covered in this courseCreate application programming interface (api) keys for openai apisSend an api request from curlSend an api request from pythonSend prompts to the chat completions apiSend prompts to the legacy completions api
-
Send prompts to different models and view the resultsConfigure functions to check determinismAdjust the seed parameterConfigure the temperature and max tokens parametersConfigure stop sequences and penalties parametersSummarize the key concepts covered in this course
IN THIS COURSE
-
2m 19sIn this video, we will discover the key concepts covered in this course. FREE ACCESS
-
7m 34sLearn how to create application programming interface (API) keys for OpenAI APIs. FREE ACCESS
-
10m 56sFind out how to send an API request from cURL. FREE ACCESS
-
10m 50sDiscover how to send an API request from Python. FREE ACCESS
-
10m 44sDuring this video, you will learn how to send prompts to the chat completions API. FREE ACCESS
-
9mIn this video, find out how to send prompts to the legacy completions API. FREE ACCESS
-
12m 28sIn this video, you will learn how to send prompts to different models and view the results. FREE ACCESS
-
12m 54sDuring this video, discover how to configure functions to check determinism. FREE ACCESS
-
12m 26sFind out how to adjust the seed parameter. FREE ACCESS
-
9mLearn how to configure the temperature and max tokens parameters. FREE ACCESS
-
11m 56sDiscover how to configure stop sequences and penalties parameters. FREE ACCESS
-
3m 2sIn this video, we will summarize the key concepts covered in this course. FREE ACCESS
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.
Digital badges are yours to keep, forever.