Hands-On AI Development with OpenAI API

You'll start from the ground up, mastering Python programming basics, and then dive into practical applications using the OpenAI API to bring AI-powered solutions to life.

Lesson 1

First Steps with Python & Visual Studio Code

In this video, you'll learn how to set up the development environment commonly used in my tutorials, and we'll cover essential programming concepts like conditions, loops, and modularity. This tutorial is perfect for developers who are new to Python.

In this tutorial, you'll learn:

  • How to install and use Visual Studio Code for Python development
  • How to write basic Python scripts, including handling input and output
  • How to use conditions and if statements to control program flow
  • How to create and implement while loops for continuous processes
  • How to define functions to avoid code duplication and improve readability
  • How to organize your code by importing functions from external files

By the end of this tutorial, you'll have a solid foundation in Python programming, setting you up for more advanced concepts in upcoming lessons.

Full Video & Source Code
 

Lesson 2

First Call To OpenAI API

In this video, you'll learn how to connect to the OpenAI API using Python, enabling you to build AI-powered applications. We'll walk through the steps to sign up for OpenAI, set up the environment, and execute a basic API request.

In this tutorial, you'll learn:

  • How to sign up and generate an OpenAI API key
  • How to install the OpenAI Python package and set up a new Python script
  • How to interact with the API to generate responses using GPT-4
  • How to customize parameters like temperature, max tokens, and top p to control the response behavior
  • How to access and print specific parts of the API response, like the content of the message
  • How to modify your script to generate more complex outputs, such as jokes or stories

By the end of this tutorial, you'll have a fully working Python script that interacts with the OpenAI API and generates dynamic responses.

Full Video & Source Code
 

Lesson 3

How To use Local LLMS

In this video, you'll learn how to set up LM Studio, a tool that allows you to run large language models (LLMs) locally on your laptop without needing an internet connection. We'll explore its user-friendly interface and how to use it as a local OpenAI-compatible server to experiment with language models.

In this tutorial, you'll learn:

  • How to install LM Studio on Mac, Windows, or Linux
  • How to search for and download open-source language models like Lama3 from Hugging Face
  • How to set up a local server in LM Studio that mimics the OpenAI API
  • How to write and execute Python code to interact with a local LLM using the same methods as OpenAI's API
  • How to customize prompts and generate responses using LM Studio

By the end of this tutorial, you'll be able to run LLMs entirely offline and integrate them into your Python applications.

 
Full Video & Source Code