
Explore building a full stack chatbot with fast API, Python, and OpenAI, featuring a chat interface and image generation. Learn to leverage AI to improve development skills.
This course content covers a Python and FastAPI refresher, OpenAI essentials, tokens, and prompt engineering. It guides you to build a personal chat bot with image generation and AWS deployment.
Watch all videos and complete each section to maximize learning, using practical examples to connect theory to knowledge, complete exercises before solutions, and search for additional information in the Q&A.
Check for an existing Python 3 installation on macOS or Windows using python3 --version or python --version, note that Python 3.17.2 is newest and fast API requires 3.7.
Install Python on Windows from the official site, add Python to path, verify version, and run your first hello world program to begin building fast api apps.
Install python 3.11 on mac from python.org, verify the installation in the terminal, and run a first script that prints 'Hello, world' to prep for fast API.
Explore the Python integrated development environment, a source code editor with terminals, build tools, and debuggers that help write software, find bugs, and work efficiently, with PyCharm introduced.
Install and set up an integrated development environment using PyCharm on macOS and Windows, create a Python project, and write and run basic scripts to verify the setup.
Explore Python variables as containers for data values, learn assignment, integer and floating-point types, and operations like printing, tax calculations, and string concatenation.
Learn how Python comments hide code at runtime, using the hashtag for single-line comments and triple quotes for multi-line blocks, with examples like printing Hello world and Hi Eric.
Learn to compute your remaining money in a Python assignment by calculating 50 minus 15 and 15 times 0.03, yielding 34.55, using both variable-based and direct-expression approaches.
Explore string formatting in Python, using concatenation and f-strings to print dynamic greetings like Hi Eric and Hi Eric Robbie, and learn the format method.
Learn to collect user input in Python by asking for a first name and birthday days, store them in variables, and print a formatted message using f-strings.
Master string assignment by converting user input to integer, compute weeks until birthday by dividing days by seven, and optionally round to two decimals.
Explore Python lists as collections of data, learning how to create, index (zero-based), slice, and modify lists with append, insert, remove, pop, and sort.
Learn about Python sets and tuples, where sets are unordered and contain unique elements. Tuples are ordered but immutable, while sets support discard, clear, add, and update for fast deduplication.
Shows a Python lists assignment with a zoo list of five animals, removing the third item, appending a lizard, deleting the first, and printing with slicing.
Explore booleans as true or false, declare variables, and inspect their types. Learn six comparison operators (==, !=, >, <, >=, <=) and logical operators (and, or, not) with examples.
Master Python flow control by using if, else, and elif statements to evaluate conditions and execute appropriate print statements. See practical examples and how multiple elifs handle complex conditions.
Learn how to implement Python if-elif-else logic to map a numeric grade to letter grades A through F, using a grade variable and conditional branches.
Learn Python loops with for and while statements to iterate lists, ranges, and strings, print elements, and sum values while using continue, break, and else.
Master Python loops by implementing a for loop inside a while loop to print a list three times, skipping Monday with continue and visualizing outputs with dashed separators.
Explore Python dictionaries, where keys map to values, and perform operations like get, length, pop, clear, and delete. Learn looping and copying to manage memory and access items.
Demonstrates Python dictionary operations by creating a vehicle dictionary, iterating over items, copying it, adding a new key for tires, removing mileage with pop, and printing the updated keys.
Learn to define and call Python functions with def, pass parameters, manage scope, return values, and compose functions through examples like printing names and calculating taxes.
Learn how Python imports bring functionality from separate files into your program and calculate homework averages to organize code. Explore standard library modules like random and math.
Discover object oriented programming in Python, defining objects by behavior and state and using classes to instantiate them. Explore encapsulation, abstraction, inheritance, and polymorphism.
Learn object oriented programming by building an arena game where enemies like zombie or ogre fight each other, with health points and attack damage, using encapsulation, abstraction, inheritance, and polymorphism.
Define a Python class named enemy with type, health_points, and attack_damage attributes; instantiate enemies, customize health and type, and print their details.
Explore abstraction as the interface that hides implementation details while exposing simple operations like on/off or talk. Apply it to Python objects to create reusable, scalable code.
Explore python object oriented programming abstraction by building an enemy class with health and a zombie type, and implement talk, walk forward, and attack methods.
Explore constructors in Python object oriented programming, learning default, no-argument, and parameter constructors to initialize objects with or without starting values, including example enemy types and attributes.
Explore Python constructors, including default, parameter list, and parameterized forms, to initialize objects with health points and attack damage, using __init__ and self toward encapsulation.
Explore encapsulation in Python by turning attributes like type of enemy, health points, and attack damage private with double underscores, using getters and setters, and preventing unauthorized changes.
Implement encapsulation in Python by making the enemy type a private variable with double underscores and exposing it via a getter method to control access to zombie or ogre.
Inheritance forms a class hierarchy where a dog inherits animal attributes like weight, color, age, and eat and sleep methods, and can override behavior or add unique features.
Explain how self accesses the current object's properties and differentiates parameters, and how super calls the parent constructor in a subclass, with Python person and student examples including degree.
Implement inheritance in game by creating zombie and ogre subclasses of the enemy superclass, using super constructors and method overriding for talk, with zombie's spread disease as a unique feature.
Demonstrate inheritance in Python by creating zombie and ogre as child classes of the enemy base class, reusing constructors with super and overriding methods like talk.
Explore polymorphism in Python by using an animal hierarchy where dogs, birds, and lions inhabit a single zoo list; runtime polymorphism calls the correct animal sounds via a common interface.
Implement polymorphism by defining a battle function in main.py that calls an enemy's talk and attack methods, passing in zombie and ogre to demonstrate polymorphic behavior.
Demonstrate polymorphism as the fourth pillar of object oriented programming by showing zombie and ogre share an enemy interface and battle using talk and attack.
Develop a battle between zombie and ogre by adding no special attack to the enemy class, while zombie and ogre use probabilistic attacks that affect health points and power.
Explore creating a turn-based battle between zombie and ogre enemies in Python, adding randomized special attacks that heal or boost attack, and implementing a battle loop.
Learn how composition in Python creates objects that contain other objects, such as a vehicle with an engine, through a has a relationship and by starting and stopping the engine.
Explore composition by building a hero with health points, a weapon, weapon type, and attack increase, then equip a weapon to boost attack damage in a hero versus zombie scenario.
Develop a hero class that can equip a weapon, illustrating composition as a has a relationship, and run battles to compare attack damage while covering abstraction, encapsulation, inheritance, and polymorphism.
Explore FastAPI, a Python web framework that delivers high performance, embedded data validation, serialization, and automatic documentation for building secure, scalable RESTful APIs.
Learn how Python virtual environments isolate project dependencies for fast api, uvicorn, ai, and IoT apps. Use Pip and venv to create, activate, and install app-specific packages.
Create and activate a dedicated virtual environment for FastAPI on Windows, install FastAPI and uvicorn, verify installations with pip list, and manage activation as needed.
Create and activate a Mac virtual environment for a fast API app, then install fast API and uvicorn and verify dependencies with pip list.
Build a books app with fast api, implement create, read, update, and delete operations, expose endpoints and swagger ui, and handle http request methods for title, author, and category data.
Create a FastAPI app with a get endpoint to return books using uvicorn, app.get, and the /books route, demonstrating async functions and endpoint responses.
Create and run your first fast api application, configure a local interpreter in a virtual environment, and define an async api endpoint that returns Hello Eric via uvicorn.
Learn to enhance a FastAPI get request to return a list of books, implement /books, and explore Swagger docs for testing and reading all books.
Master FastAPI path parameters by using static and dynamic routes, naming conventions, and the order of matching to return specific resources.
learn how to use path parameters in fastapi to create dynamic routes, specify parameter types, and order routes to return all books or a single book by title.
Explore FastAPI query parameters to filter books with a category param. See how /books and /books/{author}?category=science connect path and query parameters.
Learn to filter data with FastAPI using query parameters, combining path and query parameters to search books by category and author, and observe Swagger UI integration.
Learn how post requests create data in fastapi by sending a body, such as a new book with title, author, and category, to /books/create_book with app.post.
Use post requests in FastAPI to create a new book by sending a body with title, author, and category to /books/create_book, app.post, and append to books.
Learn how to implement FastAPI put requests to update existing data using a request body, updating a book's author or category by matching titles in a list.
Update a book using a put request by matching the title and replacing the author and category with the request body data.
Learn how to implement a FastAPI delete request to remove a book by title, using app.delete with a dynamic path parameter to locate and delete the item from the list.
Implement a FastAPI delete request to remove a book by title using a path parameter, updating the in-memory list and reflecting changes in read all books via Swagger UI.
implement a fastapi endpoint to fetch all books by an author using path and query parameters, and understand how endpoint order affects routing and results for author two.
Explore OpenAI overview, compare ChatGPT versions 3.5 and 4, and learn to use OpenAI APIs and the Playground to build customized chatbots with large language models.
Explore OpenAI cost fundamentals, comparing ChatGPT pricing and API usage, learn token-based pricing, required balance, and how input/output tokens drive costs.
Explore how OpenAI tokens determine input, output, and price, and see how the same text splits into multiple tokens with examples like 'coordinates to treasure'.
Learn how OpenAI's tokenizer converts text into tokens for GPT models, with practical examples showing token counts, characters, and input-output token relationships.
Explore OpenAI prompts and messages, including user, system, and assistant prompts, and how prompt engineering and backend arguments shape a chatbot's behavior, responses, and learning path.
Discover OpenAI models for our chatbot, including GPT 3.5 and GPT 4. Use Dolly for image generation, Whisper for audio to text, embeddings, and moderation.
Explore the OpenAI playground, a web-based sandbox to interact with models, test prompts, and adjust arguments like temperature before integrating into your API or application.
Sign up for OpenAI, explore the playground and API, set billing, and experiment with prompts, system prompts, and model settings like temperature to build a customizable chatbot.
Build a full stack chat bot with Python, FastAPI, Dolly image endpoint, and Jinja2, using OpenAI endpoints to respond to user prompts via a responsive user interface.
Discover how to use the OpenAI access key as an API key, keep it safe as an environmental variable, and avoid sharing or committing it to repositories.
Visit openai.com, log in or create an account to obtain a free trial API key, then create and name a secret key, copy it and save it for your project.
Install OpenAI dependencies, export the API key, and build a chatbot with OpenAI chat completion using GPT-3.5 Turbo, including a system prompt and user prompt example.
Create your first OpenAI chatbot endpoint by installing openai, configuring an API key, and using GPT-3.5-turbo with a system message 'you are a helpful assistant' to generate responses.
Identify OpenAI API changes by comparing legacy and updated function calls, including chat completions create. Keep the original function, note deprecations, and expect future videos with updated naming.
Explore how chat bot messages use OpenAI prompts—user, assistant, and system—and pass a messages array to customize responses, log interactions, and shape behavior with system prompts.
Connect to OpenAI and build a personal chatbot by managing a messages list with system, user, and assistant roles, using GPT-3.5 turbo and message history.
Adjust the temperature in code to control the randomness of chatbot responses, with a 0–2 range and lower values yielding predictable words. Set higher temperatures to enable more creative responses.
Adjust the temperature to control chatbot creativity, from 0 for predictability to 2. Test at 0.6 and extract the first choice's message content to optimize responses.
Learn to build a chat log and history that enables back-and-forth dialogue with a bot by dynamically appending user prompts and bot responses to a chat log using OpenAI.
Learn to build a terminal chat bot that keeps a chat log by recording user and assistant messages, using a while loop and GPT 3.5 turbo to generate responses.
Install fast api, uvicorn, python multipart. Implement a post endpoint with app.post and async def chat that accepts form input and returns the bot response for swagger docs.
Install fast API and uvicorn, then create a post endpoint at / that accepts form data to update a chat log and return an OpenAI GPT-3.5 Turbo response.
Learn how to add a system prompt to a FastAPI chat bot, turning it into a Python tutor that guides learners from basics to production-ready Python applications.
Learn to build a Jinja2 based user interface in a FastAPI app by creating a layout.html, configuring templates, and rendering it through an HTML response endpoint.
Build a web user interface for a FastAPI chat bot by creating a layout.html, configuring jinja2 templates, and returning HTML responses via FastAPI.
Set up a full stack app with Bootstrap 5 by integrating the Bootstrap css and bundle with Popper, using the starter template and cdn links to load css and js.
Build a Bootstrap-styled chat interface by creating home.html with a chat input and history, inject it into layout.html, and render it with FastAPI for a responsive, full-stack chat app.
Update FastAPI chat handling to render html responses, append user input and bot replies to the chat log, and render layout.html via jinja templating in home.html.
Implement chat responses in a Python web app by updating main.py to log user input and bot replies, maintain chat history, and render via home.html using Jinja and GPT-3.5 Turbo.
Add a responsive top navigation bar to your web app by creating a nav bar html file and injecting it into layouts, then view a branded personal chat bot interface.
Explore the DALL-E overview and how OpenAI generates realistic images from text prompts. See a sample API call that creates a 1024 by 1024 cartoon duck image.
Leverage the DALL-E OpenAI image generation API in a Python demo to call image.create with a prompt, n, and size, then print the image URL.
Learn to enhance a chatbot interface by adding an image generation page, updating templates and routes, and wiring a /image form to generate images from a personal chat bot.
Create a post API endpoint that accepts a text prompt, generates a 512 by 512 image with OpenAI, and displays the image URL on an HTML page.
Add a navigation toggle to switch between a chat bot and an image generator in a full stack app, including a generate images API endpoint and persistent chat history.
Implement real-time streaming with WebSockets for bidirectional chat, connect the front end with JavaScript, and enhance visuals with CSS to deliver a professional, dynamic chatbot experience.
Explore how WebSocket enables real-time two-way communication between the browser and server using FastAPI, enabling a live chatbot stream with a ws endpoint and a front-end div-based UI.
Learn to implement WebSockets with FastAPI to enable a bidirectional, real-time chat between a client and server, including a WebSocket endpoint, client-side JavaScript, and real-time messaging.
Integrate WebSocket communication with OpenAI to power a chatbot by merging existing WebSocket and OpenAI calls, sending user input through a chat log to GPT 3.5 turbo, then streaming later.
Extend the WebSocket chat by integrating OpenAI chatbot logic, log user messages, call OpenAI chat completions with GPT four, and return the bot response toward real-time streaming.
Implement streaming in the WebSocket to deliver real-time, chunked ai responses, building the final message as chunks arrive and updating the front end accordingly.
Learn to implement real-time WebSocket streaming with OpenAI chat completions, handle streaming chunks, and build the full AI response in a bidirectional chat.
Apply css to your chatbot to create a clean, professional look by styling chat history and messages in layout.html, with blue user messages, gray bot responses, left-aligned, fixed bottom footer.
Apply custom CSS to clean up a real-time chat UI, styling chat history, left-aligned messages, iOS-style bubbles, and a fixed bottom input footer to look professional.
Retain chat messages by updating home.html with jinja templating to loop through chat history until the app closes, alternating user input and ai responses with blue oval and gray messages.
Enhance the chat bot home page by rendering persistent chat history with a Jinja for loop in home.html, differentiating user and bot messages by index parity for better user experience.
Update the navigation bar with a gray background and a green Bootstrap dropdown to switch chatbot and image generator, and add a user input inside the image form.
Update the navigation bar to a cleaner, professional look with Bootstrap, switch to a light navbar and bg, and add a dropdown button group for chatbot and image generator.
Update the images API and interface by resizing images for mobile, refactoring image.html form, and adjusting inputs and button styling to look great on desktop and mobile.
Deploy your chatbot on render, using https and a global URL, and configure environment variables for the OpenAI API key with a requirements.txt and GitHub deployment.
Learn to use environmental variables to securely store API keys and passwords with a .env file, loaded via python-dotenv and retrieved with os.getenv in local and production environments.
Store the API key in a .env file for deployment, load it with python-dotenv, access with os.getenv, and avoid committing the key to the repository.
Switch the WebSocket URL for local versus production with an if-else on window.location.hostname. Use ws or wss and build the string with backticks to inject the hostname.
Configure WebSocket connections for deployment by switching from localhost to a secure ws/wss URL based on the host, and adapt templates to production domains.
Generate a precise requirements.txt using pip freeze, trim redundant subpackages, and prepare for deployment by managing env files, main.py, and templates alongside essentials like fastapi, uvicorn, jinja2, and websockets.
Install Git on a Windows PC by downloading from git-scm.com, choosing 64-bit or 32-bit, completing the setup with default options, then verify Git version.
learn how to check for git on macOS using the terminal, and install or upgrade git with Homebrew via brew install git, verifying with git --version.
Create a GitHub account and repository, push code for continuous integration and deployment, and configure repo settings like name, visibility, readme, gitignore, and license.
Set up a git repository, create a .gitignore to exclude dot env and env, initialize, add, commit, and push to origin main while adding a readme.
Deploy our chatbot live using render, connect a GitHub repository, configure build and start commands with uvicorn, and manage free-tier spin-down while exposing a production websocket-enabled URL.
Establishes closing gratitude, invites questions or career updates, and directs learners to stay in touch through email and the coding with Robby YouTube channel.
Are you tired of boring, outdated & incomplete tutorials? Build an application YOU can be proud of.
Learn how to BUILD and DEPLOY a Chatbot application from scratch! Includes the modern capabilities of GPT-4, OpenAI API, DALL-E and more
-
AI (artificial intelligence) has some of the hottest and most in-demand technologies in the market.
By the end of this course, you will have built your own production ready AI Chatbot, that leverages the power of FastAPI, GPT, DALL-E and more! There are tons of tutorials, but how many actually show you how to build an entire application and then deploy it so the world can see YOUR app?
-
Being able to leverage AI into your application can improve the job you have, get you a new job, or even create a startup / contract roles! These skills are highly sought after with some of the highest paying job postings are asking for AI, Python & FastAPI experience.
In this complete Chatbot course you will quickly get caught up to speed with a full refresher on Python and FastAPI that is integrated. Whether you are wanting to expand your current craft, want to change careers or simply wanting to learn a new fast growing piece of technology, then this course if for you. You will be using all modern technologies that include: OpenAI, GPT-4, ChatGPT, DALL-E, FastAPI, Python, PyCharm and WebSockets!
This course is designed with beginners in mind! This means no matter what kind of background you come from you will be able to learn some of the hottest technology in the market! All you need is some basic programming knowledge, take the refreshers and you will be on your way!
-
In this course, you will get (not only):
- All source code is available for download
- Responsive Instructor: All questions answered within 24 hours
- Professional video and audio recordings (check the free previews)
- High quality closed-captions / subtitles available for English (new!)
-
Content and Overview:
Install & Setup Python, IDE & FastAPI
Refreshers on Python & FastAPI
Learn Prompt Engineering
Creating OpenAI Account
Creating Secret Keys
Create and scale a personal Chatbot
Full Stack Development
Deploy your application so the world can use it
And more!
Course videos are regularly updated to keep up with the newest updates and information. The codingwithroby community is very active, so always know that if you have a question you will receive an answer within 24 hours!
-
See what other students are saying about my courses!
"Eric helped me obtain the knowledge I need in order to be onboarded on creating APIs using FastAPI. Thank you very much!"
"The instructor makes the concept easy to understand and learn."
"Very well put together... explanation is easy and simple and quizes and assignments really helps to learn and understand better"
"Excellent in-depth explanations and great content. Eric Roby is an excellent educator. Definitely, Udemy's best and most comprehensive FastAPI course!"
"Clear, crisp and covered a wide array of topics on python. Thanks Eric for the course."
"Very clear explanation, excellent teacher."
-
No Risk – Money-Back Guarantee
Finally, there is no risk. Once you purchase the course, if for some reason you are not happy with the course, Udemy offers a 30-day money back guarantee.
So you have nothing to lose, sign up for this course and learn how to build an AI Chatbot using GPT, OpenAI, ChatGPT, Python and FastAPI
It is time to level up your career and become an AI dev today!