5 Building a ChatGPT clone with .NET Aspire, Ollama, and Semantic Kernel
This chapter covers
- Fundamentals of large language models and how they can be hosted anywhere via Ollama
 - Integrating .NET Aspire with Ollama
 - Hosting a ChatGPT clone in .NET Aspire
 - Building a custom user interface for an intelligent chat app
 
Large language models (LLMs), such as ChatGPT, Claude, and Copilot, have taken the world by storm. Everyone is talking about them, including both technical professionals and non-technical people. There are so many interesting things you can do with them.
But did you know that, as a .NET developer, you can relatively easily integrate any of these models into your application, regardless of what kind of application you are building and where you intend to run it? You can build any kind of AI functionality into your application, as long as LLMs support it. You can use any advanced LLM features, such as RAG and MCP. You can build chatbots, fully autonomous AI agents, you name it.
So, how do you do it? The answer is Semantik Kernel. It is a collection of .NET libraries that provide a simple interface to facilitate interactions between LLMs and custom code.