Using OpenAI APIs: Accessing OpenAI APIs from Python

Generative AI    |    Beginner
  • 12 videos | 1h 53m 9s
  • Includes Assessment
  • Earns a Badge
Rating 5.0 of 1 users Rating 5.0 of 1 users (1)
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 course
    Create application programming interface (api) keys for openai apis
    Send an api request from curl
    Send an api request from python
    Send prompts to the chat completions api
    Send prompts to the legacy completions api
  • Send prompts to different models and view the results
    Configure functions to check determinism
    Adjust the seed parameter
    Configure the temperature and max tokens parameters
    Configure stop sequences and penalties parameters
    Summarize the key concepts covered in this course

IN THIS COURSE

  • 2m 19s
    In this video, we will discover the key concepts covered in this course. FREE ACCESS
  • 7m 34s
    Learn how to create application programming interface (API) keys for OpenAI APIs. FREE ACCESS
  • Locked
    3.  Making API Requests with cURL
    10m 56s
    Find out how to send an API request from cURL. FREE ACCESS
  • Locked
    4.  Making Our First API Request Using Python
    10m 50s
    Discover how to send an API request from Python. FREE ACCESS
  • Locked
    5.  Exploring Chat Completions and JSON Mode
    10m 44s
    During this video, you will learn how to send prompts to the chat completions API. FREE ACCESS
  • Locked
    6.  Streaming Chat Completions with the Legacy Completions API
    9m
    In this video, find out how to send prompts to the legacy completions API. FREE ACCESS
  • Locked
    7.  Exploring Chat and Completion Models
    12m 28s
    In this video, you will learn how to send prompts to different models and view the results. FREE ACCESS
  • Locked
    8.  Setting up Utility Functions to Explore Model Determinism
    12m 54s
    During this video, discover how to configure functions to check determinism. FREE ACCESS
  • Locked
    9.  Using the Seed Parameter for Almost Deterministic Responses
    12m 26s
    Find out how to adjust the seed parameter. FREE ACCESS
  • Locked
    10.  Tweaking Model Parameters – Temperature and Max Tokens
    9m
    Learn how to configure the temperature and max tokens parameters. FREE ACCESS
  • Locked
    11.  Tweaking Model Parameters – Stop Sequences Top P and Penalties
    11m 56s
    Discover how to configure stop sequences and penalties parameters. FREE ACCESS
  • Locked
    12.  Course Summary
    3m 2s
    In 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.

YOU MIGHT ALSO LIKE

Rating 5.0 of 2 users Rating 5.0 of 2 users (2)
Rating 5.0 of 1 users Rating 5.0 of 1 users (1)
Rating 4.0 of 2 users Rating 4.0 of 2 users (2)