Course Information
Course Overview
Build Generative AI-powered Blazor Web Apps—using both HttpClient and OpenAI's official .NET Library
Learn how to connect your C# applications to OpenAI's ChatGPT—build real-world Blazor Web Apps using raw HTTP and the official .NET SDK. No Python needed!
Are you a C# developer eager to explore the exciting world of Generative AI but feel left behind in the Python-centric ecosystem?
This course is made just for you.
In this hands-on course, you'll learn how to connect your C# applications to OpenAI's ChatGPT API and build fully functional Blazor Web Apps powered by Generative AI. Whether you prefer using HttpClient to make raw RESTful API calls or want to leverage the official OpenAI .NET Library, this course covers both approaches in detail.
What makes this course special:
No need to switch to Python—learn how to build GenAI apps entirely with C#
Step-by-step guidance on setting up your OpenAI account, API key, and environment
Build interactive web applications using .NET 8 and Blazor
Deep dive into the Chat Completion API, including parameter configuration and streaming mode
Real project walkthroughs with clear, beginner-friendly explanations
Learn how to enrich GPT's capabilities by enabling it to trigger your own custom C# functions using the Tool Call mechanism.
What will you learn?
The following lists the main topics of this course:
A GPT course for C# developers – A brief introduction to the course and your instructor.
Intro to GPT, ChatGPT, and OpenAI API – Understand the evolution of ChatGPT and the different types of APIs available.
Preparing the prerequisites – Learn how to set up an OpenAI account, create a payment method, and generate an API key.
Quick Start – Use ChatGPT with C# to build your first Blazor Server App that accesses the OpenAI API.
Chat Completion API – Understand required parameters and improve the UI/UX of the Blazor app created earlier.
Streaming Mode – Learn how to receive chat completion chunks by enabling streaming in the API.
OpenAI .NET Library - Chat Completion API – Learn how to install the official OpenAI .NET Library and how to use the Chat Completion API to chat.
OpenAI .NET Library – Tools – Learn to use ToolCalls to execute external functions in all chat modes with .NET.
OpenAI .NET Library – Image API – Learn how to use the Image API to generate images with different models, and how to let the Chat Completion API call the Image API through tools to create images.
What's next? – A brief look at further learning directions after finishing the course.
Who is this course for?
C# developers ready to leap into Generative AI
Engineers looking to integrate ChatGPT into their C# applications or tools
Developers interested in mastering Blazor Web App development alongside AI
Prerequisites:
This course is marked as "all levels"—from the perspective of learning GenAI development with C#. However, the following background is recommended:
The enthusiasm for learning GenAI using C# (MUST)
Basic knowledge of C# programming (MUST)
Basic knowledge of ASP.NET Core web development (Nice to have)
Course Content
- 10 section(s)
- 62 lecture(s)
- Section 1 A GPT course for C# developers
- Section 2 Intro of GPT, ChatGPT and OpenAI API
- Section 3 Preparing the prerequisites
- Section 4 Quick Start
- Section 5 Chat Completion API
- Section 6 Chat Completion API - Streaming mode
- Section 7 OpenAI .NET Library - Chat Completion API
- Section 8 OpenAI .NET Library - Tools
- Section 9 OpenAI .NET Library - Image API
- Section 10 What's next?
What You’ll Learn
- Understand the concept of GPT and ChatGPT
- Access OpenAI API via your own HTTPClient methods
- Use the Chat Completion API with the OpenAI .NET library
- Trigger external functions using Tools
- Use the Image API with the OpenAI .NET library
- Trigger multiple external Tools to complete complicate tasks
- Learn the structure and meaning of parameters of OpenAI API
- Learn how to send prompt and receive responses via non-streaming mode
- Learn how to send prompt and receive responses via streaming mode
- Know the difference between synchronous and asynchronous mode
- Learn how to debug API connection issues
- Develop two working GPT-enabled Blazor Server Apps
- Learn the differences between .NET 7 and .NET 8 of Blazor technologies
Reviews
-
SStephen Fraser
This course provided me with all the tools I needed to get my Application's AI Assistant started. Thanks!
-
DDuncan Chen
The Tools chapter is the main reason I bought this course. I finally understood how to let the model call external functions, and I also discovered that multiple tools can actually be used together. I'm happy with what I have learned.
-
PPeter Centellini
The teachers English could be better, and also the explanation in the GPT-section in the beginning is a bit hard to follow if you have no experience of AI.
-
CCristina Achim
Great spot on course! Information well structured and easy to understand. Needs a little bit of work on the spoken English.