
The introduction of this course.
The introduction of the course tutor.
A brief introduction of what GPT is.
A brief introduction of the different generations of OpenAI's GPT models.
A brief introduction of the choices of GPT models.
The requirements for users to use advance models.
A preliminary notice for subscribers.
Steps of how to create an account on the OpenAI website.
Steps of how to set up a valid payment method.
Steps of how to create a secret API key.
An instruction of the installation of Visual Studio 2022.
The quick start video demonstrates how to utilize the info provided by ChatGPT to create a working C# Blazor Server App to access OpenAI API.
The full content of the steps provided by ChatGPT for creating a working Blazor Server App to access OpanAI API. (ps: These steps contain some minor errors, the corrective actions are provided in the previous video.)
A detailed explanation of how the Blazor Server App created earlier works.
An introduction of how to protect the secret API key in your app.
The project file is used in sections 4 to 6.
The explanation of the parameters of the request body (aka Prompt) needed for the OpenAI API.
The explanation of the parameters of a chat completion object needed for the OpenAI API.
Steps to create chat completion classes using C#.
Steps to modify the Chat Completion method provided by ChatGPT for better usage.
Explanation of the parameters, finish_reason, and usage tokens.
Steps to beautify front page of the Blazor Server App.
The explanation of what streaming mode is and how it works.
Add new property for the request body class to activate streaming mode.
Create classes used to receive chat completion chunks from the chat completion API under the streaming mode.
Create a new IAsyncEnumerable method to process transactions with the chat completion API in streaming mode.
Modify the index.razor page to reflect the change for processing the streaming mode.
Create the method to convert markdown characters included in the chat completion chunk objects into HTML tags.
Display the token usage info on the front-end to the users
Add the error handling methods to manage API exceptions.
The first "Hello World!" code using the official OpenAI .NET Library. Connection methods used in this video are non-streaming mode.
Modify the non-streaming "Hello World!" program into the streaming mode by using the asynchronous streaming methods of the official .NET Library.
Explain the differences between the API we created from scratch shown in the previous videos and the official OpenAI .NET Library.
Create a new outfit for the new .NET 8 Blazor Web App that are going to be used with the OpenAI .NET Library.
Install the OpenAI .NET Library from the NuGet package management.
Build the non-streaming API access methods using the official .NET Library.
Build the asynchronous streaming API access methods using the official .NET Library.
Retrieve the Finish Reason and the token Usage info by using the official .NET Library.
Add extra option settings and system messages to the function call using the official .NET Library.
ToolCalls enable GPT to call your external functions dynamically.
Implements tool calls in non-streaming sync API with loop logic.
Adapts tool call logic for async non-streaming API behavior.
Demonstrates triggering multiple tools at once.
Introduces helper classes to build streaming ToolCalls incrementally.
Implements synchronous streaming with support for ToolCalls processing.
Implements asynchronous streaming with support for ToolCalls processing.
Centralizing tool registration via ToolRegistry for reusable integration.
Options and limitations in enforcing tool usage.
Explains the core concepts of OpenAI’s Image API, compares DALL·E and gpt-image-1 models, and clarifies their capabilities, limitations, costs, and usage scenarios before coding.
Prepares a clean Blazor project template for image generation.
Generate images using OpenAI's Image API with cloud URL output.
Improve image UI with loading dots and thumbnail previews in Blazor.
Configure DALL·E 3 image output using quality, size, style, and format options.
Generate Base64 images, embed them in Blazor UI, and preview via a modal.
Convert Base64 image data into local server-side image files for persistent access.
Integrate the Image API as a ToolCall for multi-tool Chat Completion workflows.
Use Blazor JS interop to trigger image modals from inline .NET code.
Enable multi‑turn memory by sending the full chat history to the model.
Generate multiple Base64 images in one request using the gpt-image-1 model
Generate multiple images by combining results from multiple tools in one prompt.
Description of what comes next!
Learn how to connect your C# applications to OpenAI's APIs—build real-world Blazor Web Apps using raw HTTPClient 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)