From the course: Semantic Kernel in Action: Fundamentals

Setting up

- [Instructor] Welcome to the setting up video for the Semantic Kernel development environment. Today, we are going to set up everything you need to start building with Semantic Kernel. First, we will have to decide if you would like to code on your computer or in the cloud. For this last one, LinkedIn Learning is providing, free of charge, the GitHub Codespaces feature. This is explained on the next video. The current one explains a local setup and the cloud AI services setup. To run Semantic Kernel, we will need an IDE, an integrated development environment, either in Visual Studio Code, Resource Studio, or any of your liking. Recommended thing is to get a Semantic Kernel rep from GitHub, and for this, we'll need a GIT client that we need to install if you don't have. And to run Semantic Kernel applications internet, we will need a configured AI service, in the cloud or local, that provides one of the latest open AI compatible models. We will work mostly with Azure OpenAI in this course, but you can do as you please. And also this is changing very quickly, so it is smart to watch out for changes. So I'm dropping the link down below with a quickstart guide that should be updated regularly. We will start with Git and clone the repository, then install an IDE and then .NET 8.0, and .NET interactive, which is optional. That's usually for Visual Studio Code if we want to run the polite load notebooks and we will set up Azure OpenAI Service and finally do a final check. Let's get that done. To the requirements, the quickstart guide, we can see that it provides some links. One for Git or GitHub application, Resource Studio Code or Visual Studio OpenAI, .NET SDK. It's at this moment it's better to install 8.0 and the Polyglot notebooks. So first I recommend to download Git. I like the common line, but you can download the client you like. I would in my case, download the Windows one, don't load it and install it. That's fairly easy. And then I recommend to get the code from semantic-kernel in GitHub. This we can go on github.com, Microsoft semantic-kernel. Go to the code and copy this URL. And if it does not fail, let's clone this with Git. And one more thing, if you are logged in and you like you're seeing, you can go there and give them a star, it will not hurt. Alright, this is cloned. The next thing is do not Resource Studio. But then first I will download .NET. So you go dotnetmicrosoft.com downloads and we go up, I'm doing this in (indistinct) Machine to show how it's done. I download the .NET SDK, you see the latest and greatest. The user, you open it, installs and next. So basically the 8.0 is needed for .NET interactive. Recently skip to use .NET 8.0 instead of 7.0. And we go there and install is usually pretty quick. Once it's done, we can install Visual Studio Code if you want Visual Studio. But Visual Studio Code has some tools and things which are pretty, pretty useful. So I recommend you install that one. Only to install one. I think I click it a few times. Alright, and that part is done. The next thing is Visual Studio, which I will install and yeah, should start now. And accept we trust in Microsoft. And next, next, next desktop. Hoping with code is always good. Yes, uninstalled. All ready and we finish. And this to the code should be launch. One important thing is to select dark version. You are not a real developer if you don't choose dark and in extensions. Yeah, we can install that in Jupiter. We don't need that. I think we can install it through comma light, but also through here, so. Polyglot notebooks. Yes, that's basically this. And you can install the release or meta release. So this will install .NET interactive. And there's also this is a Polyglot Notebook function powered by .NET interactive. So it will install everything that we need here. And the other thing is. Yeah, semantic-kernel tools. That's it. That's everything that we needed to develop. We'll keep going in a moment, but first I'm going to create a resource. And for this, let's make a pause here and we will create an OpenAI and Azure OpenAI Service. So click right OpenAI. We go to OpenAI Services and we click on create. Microsoft Azure sponsorship. We can give it a nice name like resource group like OpenAI. We can, for example, if (indistinct) okay, we don't care about that. Ideally you want it to be as close to you as you can, but some of them do not provide some models. That's up to you to decide. And here, that would be a good name. LinkedInLearning semantic-kernel and pricing tier zero. Okay. And then once this, we can click on next. At the moment, this is for demo only. And I will delete this one right after we are done. And click on create. This will take a bit. All right, it's created. And there we go. Deployment succeeded. Cool. Here we have some keys endpoints that have been created for us. And in overview, we can open the Azure OpenAI Studio, which we can click and open it in another one. And let's close this, we're not going to use that yet. And if we go to deployments, we will see that we do not have anything yet. And we can create one with clicking create new deployment. We select the model, we can select gpt4 update to default. Looks good to me. Deployment name gpt4. And create. This will take a bit, but it's already here. And we give it the name deployment name gpt4. This is important. So if we open now BS code, right? And we go to .NET. Here one thing important is the Polyglot notebook before I forget, should be here. In this case, it's already installed. So .NET too. And yeah, I have already installed semantic-kernel tools and a few other things I wanted. So coming back here to the file explorer, I go to .NET. I go to the notebooks. Yeah, AI settings. So here are the settings that I have. These is coming from the Anaconda and the Python world where we can mix markdown and code with is executable. Here I will use Azure (indistinct). I will put that through and we'll execute it. So please execute it. Piece of code. And the outcome of this code remains on the context for the full page that we are doing. Now, step two, I will configure it. And here I already set this up. It'll ask these parts of the configuration. And on my case here is the deployment name. And if I go to Keys and Deployment, the endpoint is this one. You can copy it and paste and the key, any of these keys, you can copy and use them. And then you can also run these. And we could also rest the configuration. And these will import everything. To try it out, we can open the getting started. These will add some configuration and settings. This will import Microsoft Semantic Kernel. This case a better version, it still would need to be updated. But anyhow, it still works. To check our environment, this works quite well. And we create the kernel, the kernel builder in this case. And we will configure the OpenAI Service credentials. As we set these to Azure, this is the one that will be executed since something did not work. Ready config manually, you refer. So let's delete it. Again, what you're seeing here does not matter 'cause I will delete that after this video. Yeah, settings. So let's execute that again and enter the Azure OpenAI endpoint. So I go here, I copy it, paste, enter OpenAI deployment name. We gave it gpt4 and the key. And for that we need to go and copy it so we can copy the clipboard, then come back, paste and enter. All right. And then getting started. All right, I think we want to stop and restart. Yeah, report the new package, create the kernel, and then do that. Now it work. And then we will load and run a plugin in this case. It's a fun plugin. It will make a joke about a time travel to (indistinct) are age. Why don't you ever borrow a T-Rex stapler in the office? Because when you try to return it, he'll say, sorry, I can grab it that my arms are too short. Yep, pretty much. Alright, so everything is working and again, I'll leave the links here. Git-scm if you want to install that version. Depends on you. The link to the repository of semantic-kernel. Download for resource studio code, if you want Polyglot notebooks, that's quite interesting to work with. And then the download for .NET. Again, I recommend LTM long-term version, which at the moment is .NET 8.0. But whenever you watch a video, these may have changed. And then portal.azure.com and I think with this (indistinct) and happy installing.

Contents