
Master the fundamentals of generative AI and the OpenAI API, set up an account and API key, and build your first Python program with text completion and sentiment analysis.
Discover how this course is organized into short, hands-on lectures with quizzes and assignments, guiding you to set up Python, an IDE, and an OpenAI account and API key.
Download the lecture resources zip to access the slides, including a keynote file for Mac and a PowerPoint file for Windows. Use them and share the knowledge with peers.
Explore what artificial intelligence is by comparing human intelligence—reasoning, planning, abstract thinking, and problem solving—with how machines simulate thinking through data, machine learning algorithms, and models.
Learn what generative AI is, how it differs from traditional ML and deep learning, and how models like GPT generate new content using transformer networks.
Understand what OpenAI is and why the OpenAI API matters, enabling developers to use models for text, images, and more via a restful API with Python or JavaScript libraries.
Learn what ChatGPT is and how it uses OpenAI GPT-3.5 or GPT-4 models to answer questions, generate campaigns, and summarize text, while recognizing its limitations, biases, and occasional hallucinations.
Learn to set up and use ChatGPT, choose between GPT-3.5 and GPT-4, explore prompts and examples, and tailor responses with custom instructions.
Master prompt engineering by using action verbs and precise instructions to guide the model. Follow four guidelines—provide context, audience, style and format, and length—for clear, targeted outputs.
Learn to use ChatGPT for text summarization by applying prompt engineering, setting output limits and structure, and focusing on key areas to transform customer feedback into actionable insights.
Learn how text expansion boosts productivity by expanding brief prompts into detailed job descriptions and professional emails, using prompt engineering to control tone, length, structure, and audience.
Explore how ChatGPT can research and plan trips, use a travel planner role, apply prompt engineering and multi-step prompting to generate and update an eight-day Europe itinerary with budget estimates.
Learn how ChatGPT acts as a universal programmer across languages, generating, documenting, explaining, and debugging code—from Python to Java and C#—with practical prompts and examples.
Classify customer service tickets with chatgpt by routing them into technical issue, billing query, or product feedback categories using a role and context in prompts.
Explore how ChatGPT fuels marketing campaigns, crafting teaser and full trailers, social media buzz, and influencer partnerships for a crime comedy film launching December 7, 2023.
Discover how ChatGPT translates across languages using prompts in a dedicated translation window. Learn handling multilingual text, including Hindi, and translating quickly into English or any language.
Learn to use conditional prompting to generate a title only for English text, with language checks. Apply multi-condition prompts that rely on keywords like technology and translations in APIs context.
Learn to control output structure with prompts in ChatGPT, generating numbered or unordered lists, tables with columns, and structured paragraphs with clear headings for diverse use cases.
Generate sample data for testing by creating a CSV with ten customers (id, name, age, email, phone), then convert to a JSON array for a RESTful API.
Create and access an OpenAI account, navigate sign-up steps, and manage billing, profiles, and usage to start exploring tutorials, examples, and ChatGPT plugins in this course.
Learn OpenAI pricing and rate limits, including token costs, 8k/32k context, and GPT-4 versus GPT-3.5 Turbo pricing.
Explore the OpenAI Playground to run chat prompts with gpt-35-turbo, using system, user, and assistant messages, and learn to load presets, save chats, and view code for API calls.
Learn how to create and securely configure an OpenAI API key, set it as an environment variable on Windows, Mac, or Linux, and revoke it when needed.
Create a new python project in your IDE, name it openaiapidemo, and configure the interpreter. Install the official openai library to connect to OpenAI from your Python programs.
Explore using the OpenAI API in Python to call models, build a client, send system and user messages, and read the chat completions response.
Learn to get three cake recipe responses for the same prompt by setting n to three and iterating over response.choices in ChatCompletion.
Learn sentiment analysis with a Python-based sentiment_analyzer that classifies two reviews from reviews.txt, showing the first as positive and the second as slightly negative.
Learn to implement a text classification use case by preparing a list of companies and a simple categorize prompt to classify them into technology, pharmaceutical, and finance and banking sectors.
Explore how to prompt a model to explain Python code in one sentence using a code_explainer workflow and a system message 'you are a Python tutor', with a prime-checking example.
Learn to steer model behavior and maintain session context by using the assistant role in requests, with system and user messages guiding responses in the OpenAI Playground.
Learn how providing context to the model alters its responses through in-context training, using a Python tutoring example to explain the sum function and its syntax.
Build a chatbot and learn how ChatGPT-like applications maintain context using in-context learning, system and user messages, and iterative model responses.
Learn to moderate text with OpenAI's text-moderation-006 model via Moderations.create, pass inputs, inspect results, flagged status, categories, and category_scores for safe applications.
Enable streaming with the OpenAI chat completions API by setting stream to true, receive token chunks as deltas, and render them in real time in the UI.
practice error handling for openai api calls by wrapping requests in try blocks and catching authentication, bad request, api error, api connection, timeout, internal server error, and rate limit errors.
Explore Whisper, an OpenAI audio model that transcribes and translates speech to text, used in Python via the Transcribe method with optional language and json or text outputs.
Mix multiple models to transcribe audio and summarize content using whisper and GPT models. Transcribe aws_lambda.mp3, pass the text to the GPT model, and generate five bullet-point insights.
Learn to process lengthy audio by breaking it into chunks with pi dub's audio segment, create mp3 files, and transcribe each chunk with the api to assemble a complete transcript.
Install pyDub in your IDE and set up Python interpreter in PyCharm. Install ffmpeg via choco or brew and add its bin path to system path to enable audio manipulation.
Learn to chunk a large mp3 into two-second pieces using pydub, save each chunk as mp3, send them to whisper-1 for transcription, and concatenate the transcripts into a final output.
Explore text embeddings and vector representations that capture word and sentence meaning, and compare them with cosine similarity for applications in search, recommendations, and translation using OpenAI embeddings ada 002.
Learn to retrieve word and sentence embeddings with the embedding API using text-embedding-ada-002, by running a Python workflow that outputs numeric embedding data.
Learn to measure similarity between words and sentences using embeddings and cosine similarity with numpy in python, comparing hot and cold and you are good versus you are awesome.
Learn to compare multiple sentences dynamically by generating embeddings, iterating with nested loops, and computing similarity scores to reveal text similarity.
Explore how Dall-e from OpenAI creates and edits images from plain English prompts, generates variations, and controls size and resolution using a masked image and a prompt to guide changes.
Learn to generate images with the DALL-E API by sending a text prompt and retrieving the cloud-stored image URL from the API response.
Learn to request binary image data with response_format b64_json, decode base64 data, and save it as a 512 by 512 image (zurich.png) on the local file system.
Learn to generate two variations of an image by calling openai.image.create_variation with binary data from ferrari.png, receiving two URLs for the variations and optionally changing dimensions to 512.
Use the create_underscore_edit method with the original image and optional mask to edit with dall-e, then generate one or more edited images based on a prompt and optional edit count.
Learn to edit an image with DALL-E using housewithpool and masked.png, placing them in an edit directory, and prompting a 1024x1024 edit that adds a tube in the pool.
Explore function calling with the OpenAI chart completion API, define and pass functions like get stock price, and orchestrate model-driven calls to fetch stock data.
The lecture introduces function calling by building a stock_price_fetcher, illustrating how to fetch stock data with a function when the model lacks internet access.
Learn to implement function calling with the OpenAI API, define a get_stock_price function, pass parameters like symbol via JSON, and handle function calls and responses in Python.
Parse the model's response, check for a function_call, deserialize the function arguments from json, and invoke get_stock_price with the symbol. The result shows the stock price example for AAPL.
Learn to use the gpt-4-vision-preview model from Python to send text and image in a single request, using the prepared messages.txt, an image_url, and an explanation of the image.
OpenAI's GPT series of language models have created headlines the world over.This course equips learners with the tools and expertise needed to develop AI-powered solutions, enabling them to leverage OpenAI's state-of-the-art models for various real-world applications, including chatbots, content generation, translation, and more, making it an invaluable resource for those seeking to stay at the forefront of AI innovation. Enroll now and embark on your journey into the realm of OpenAI using Python!
This course is for Beginners and Experienced Programmers with knowledge of python who wants to use OpenAI Models in their applications.
Course Highlights:
Demystifying OpenAI: Gain a clear understanding of what OpenAI is, how it works, and why it's revolutionizing the AI landscape.
Getting Started with APIs: Explore the fundamentals of APIs and learn how to interact with OpenAI's API to access powerful AI models.
Exploring Use Cases: Discover a wide range of practical applications for OpenAI API across industries like content creation, chatbots, language translation, and more.
Hands-On Projects: Dive into real-world projects that will guide you through implementing OpenAI API in various scenarios, building your confidence with each exercise.
Creating Chatbots: Develop your very own chatbot using OpenAI's API, enhancing your understanding of natural language processing and conversation generation.
Content Generation: Learn how to generate creative and informative content with the help of AI models, giving your projects a competitive edge.
Language Translation: Explore the capabilities of language translation using OpenAI API and create a multilingual experience for your applications.
You will:
Understand the fundamentals of AI,Generative AI and OpenAI API
Setup OpenAI account and Key
Create and run your first OpenAI API Python Program
Learn how to process the JSON Response
Control the model behaviour by passing in different parameters
Use the Text Completion Model to do Sentimental Analysis
Use the Text Completion Model to classify text, generate code and more
Learn what roles are and how to use them in the request
Maintain the context across requests
Moderate text using the Text Moderation AI Model
Receive and Handle Multiple Responses
Handle errors gracefully
Control the quality of the response
Use Whisper AI model to generate text from audio
Translate audio from other languages to english
Use audio and text models together
Generate Images using DALL.E Model
Edit Images using DALL.E Model
Understand what text embeddings are
Work on various use-cases using the Open AI Embedding Models
Master Open AI API in simple steps
What are the requirements?
Python,PyCharm Community Edition or Any other IDE