studypolt.blogg.se

Windows task planner
Windows task planner











windows task planner

If (!string.IsNullOrWhiteSpace(planResult)) String planResult = await PlanGitHubSkill(gitHubOptions, planner, chatHistory, input, planResultTokenAllowance) Int planResultTokenAllowance = (int)(aiOptions.TokenLimit * 0.25) // Allow up to 25% of our token limit to be from GitHub. Add GitHub's response, if any, to the chat history. OpenAIChatHistory chatHistory = (OpenAIChatHistory)chatGPT.CreateNewChat("You are a helpful, friendly, intelligent assistant that is good at conversation.") IChatCompletion chatGPT = kernel.GetService() We create a new chat instance and provide a prompt to define the experience we want from the Bot.ĪctionPlanner planner = new(kernel, logger: logger) // Chat loop If you need to use chaining or want to have more steps in your plan the Sequential Planner would be great alternative. We will use the action planner which is great for 0 or 1 step plans. Now we have our plug-in defined we can setup the Semantic Kernel planner to invoke the GitHub plug-in. ") īearerAuthenticationProvider authenticationProvider = new(() => Task.FromResult(gitHubOptions.Key)) Īwait kernel.ImportOpenApiSkillFromFileAsync(įilePath: Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, "GitHubSkill/openapi.json"),ĪuthCallback: authenticationProvider.AuthenticateRequestAsync) If you don’t have an access token, you can get one from here. This defines if you will be using Azure OpenAI or OpenAI and which GitHub repo you want to use along with the GitHub access token.

Windows task planner update#

You need to update AIService and GitHub plug-in parameters. The example requires a small setup, which is all defined in the appsettings.json file. Once you have cloned the repository navigate to ‘semantic-kernel/samples/dotnet/openapi-skills’. To get the best of this blog, go ahead and clone the Semantic repo and hit that star button! I will guide you an example that uses Semantic Kernel with a GitHub Open API plug-in to build a console chat experience using action planner and a chat completion skill. Have you wondered how you can use plugins with Semantic Kernel? Or maybe you want to use plugins for your own co-pilot chat app just like our sample app?













Windows task planner