Fabian G. Williams aka Fabs

Fabian G. Williams

Principal Product Manager, Microsoft Subscribe to my YouTube.

Beginner's Guide: Setting Up Semantic Kernel AI Projects in VS Code

In this video, Fabian guides you through setting up a new Semantic Kernel AI project in VS Code, focusing on integrating samples effectively. Fabian discusses a recent interaction with MVPs, Louis from the UK and Cat from the US, about transitioning from low code to pro code, and addresses the initial setup. Using .NET CLI, Fabian demonstrates creating a new project with a simple command line and setting up essential files like `appsettings.json` for configuration. He covers utilizing Microsoft Graph and OpenAI, sharing tips for Azure OpenAI integration. Additionally, Fabian explains how to quickly initialize your project with necessary libraries using his samples, ensuring a seamless start. This tutorial is perfect for those looking to streamline their Semantic Kernel AI projects.

Fabian Williams

3-Minute Read

Fabians 2025 Product Management Framework

Setting Up Semantic Kernel AI Projects in Visual Studio Code: A Step-by-Step Guide

Hello, AI enthusiasts and developers! If you’re diving into the world of AI development with Semantic Kernel, particularly in Visual Studio Code, then you’re in the right place. In a recent YouTube video titled “LewisAndCat,” Fabian takes us through the process of setting up a new AI project in VS Code using Semantic Kernel and .NET. Whether you’re transitioning from low-code to pro-code like Fabian’s acquaintances, Louis from the UK and Cat from the US, or are just exploring new frameworks, this guide will simplify your journey.

Why Semantic Kernel?

Semantic Kernel is becoming increasingly popular for AI projects due to its flexibility and power, aligning well with technologies like Microsoft Graph and OpenAI. In Fabian’s video, he emphasizes the use of Semantic Kernel for effectively managing AI functionalities and leveraging comprehensive models quickly, thanks to his premium OpenAI subscription.

Getting Started: Tools You Need

Before jumping into the setup, ensure you have a few prerequisites: - Visual Studio Code: A versatile and powerful code editor for developers. - .NET SDK & CLI: These are essential for managing your .NET projects easily from the terminal. - Microsoft Graph & OpenAI: For data management and AI model deployment.

Step-by-Step Setup in Visual Studio Code

  1. Create a New Project: Open your terminal and navigate to your desired directory. Execute the following command to create a new .NET console application. This step sets a solid foundation for your Semantic Kernel project.

    dotnet new console -n LouisAndCat
    

This command creates a new folder named “LouisAndCat” and initializes a project within it.

  1. Inspect Your Project: Use the terminal command ls to verify the creation of your folder and cd LouisAndCat to navigate into it. Then, open VS Code with:

    code .
    

This opens your project directly in Visual Studio Code, revealing essential files like Program.cs.

  1. Setup App Settings: One crucial file not included in the samples is appsettings.json. This file is key for storing sensitive information such as API keys and model IDs. Populate it with the necessary details for services like Microsoft Graph and OpenAI, adhering to their specific requirements.

  2. Configure for Azure OpenAI: If you’re using Azure OpenAI, you’ll need to add additional configuration details like Deployment and Endpoint names.

  3. Leveraging Samples for Quick Setup: Fabian suggests a handy shortcut: copying pre-configured settings from his samples directly into your project. This method simplifies the setup for logging, HTTP client configurations, and other utilities.

  4. Verify Your Setup: To ensure everything is functioning correctly, run the following commands in the terminal:

    dotnet restore
    dotnet run
    

If all is set up correctly, you should see a “Hello World” response, confirming the environment is ready for development.

Key Takeaways

  • Start Simple: Initiating a project with basic configurations makes it easier to scale and integrate advanced functionalities later.
  • Use Configuration Files: appsettings.json is crucial for managing configuration and secrets, promoting better security practices.
  • Rapid Setup Hacks: Leveraging samples and existing configurations can expedite project setup, especially for beginners transitioning from low-code environments.
  • Test Regularly: Frequent testing ensures that your configuration and code integration are solid, preventing issues in later stages.

By following these steps, you will not only have a functioning Semantic Kernel project but also an environment ready to expand with more complexity and power. Whether you’re new to pro-code development or looking to enhance your AI project setups further, this guide provides a clear path culminating in an efficient and streamlined workflow.

For a visual walkthrough of this setup process, watch Fabian’s full video on YouTube titled “LewisAndCat”. Keep learning, developing, and pushing the boundaries of what AI can achieve!

Keywords

Semantic Kernel, AI development, Visual Studio Code, .NET SDK, Microsoft Graph, OpenAI, Azure OpenAI, pro-code development, appsettings.json, AI project setup.

Recent Posts

Categories

About

Fabian G. Williams aka Fabs Site