{"componentChunkName":"component---src-templates-post-js","path":"/blog/2024/05/13/semantic-kernel-plugins/","result":{"data":{"post":{"html":"<p>In my previous post, I introduced you to foundational concepts of <a href=\"https://learn.microsoft.com/en-us/semantic-kernel/overview/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Semantic Kernel</a>, offering a glimpse into its potential. Now, when I was learning about the what and the why, that wasn’t enough for me to fully understand the concepts and that’s why I started writing these series.</p>\n<!--more-->\n<p>Semantic Kernel Series:</p>\n<p>✔️ Part one: <a href=\"/blog/2024/04/30/semantic-kernel\">Intro</a>\r\n<br/>\r\n✔️ Part two: <a href=\"/blog/2024/05/13/semantic-kernel-plugins\">Plugins</a>\r\n<br/>\r\n✔️ Part three: <a href=\"/blog/2024/05/27/semantic-kernel-planners/\">Planners and Native Function plugins</a></p>\n<p><a href=\"https://github.com/yashints/semantic-kernel-devops\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">You can find the code on my GitHub repository here</a>.</p>\n<p>In order for us to learn about the concepts, the best way is with a story, and I chose DevOps because I was interested in finding better ways to automate daily tasks in that space for my course. Let’s go through the context and see what we’re trying to achieve.</p>\n<h2 id=\"context\" style=\"position:relative;\"><a href=\"#context\" aria-label=\"context permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Context</h2>\n<p>I want to use Semantic Kernel to generate Azure DevOps pipelines/GitHub Actions workflow for my application with simple and details instructions (aka prompts). Now the application might have multiple tiers and each might have dependency with one another and I wanted to see how this will work out.</p>\n<p>The first thing we need after we have our starter project (<a href=\"../04/semantic-kernel.md\">use my previous post to create yours</a>), is to define our prompts. I want to use plugins at this point since it is very easy with them to get my prompts introduced to the kernel and execute them based on different inputs.</p>\n<h2 id=\"setup\" style=\"position:relative;\"><a href=\"#setup\" aria-label=\"setup permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Setup</h2>\n<p>Here is what we need to get the whole setup working:</p>\n<ul>\n<li>An instance of the kernel.</li>\n<li>An instance of the Azure OpenAI or OpenAI to setup the kernel with.</li>\n<li>A plugin with different functions for Azure DevOps and GitHub Actions.</li>\n<li>Input from the user describing the application and its structure.</li>\n</ul>\n<h2 id=\"prompts\" style=\"position:relative;\"><a href=\"#prompts\" aria-label=\"prompts permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Prompts</h2>\n<p>As I mentioned we would use plugins and their functions to be able to get our input passed to our Azure OpenAI service via the kernel. Technically we could add these as inline code and it works perfectly, however, that would mean we have to define these one by one and it just blows our code base. A much better way is to use the built in feature of the kernel which allows us to load multiple plugins with their functions from a directory.</p>\n<p>All you need is a folder which contains all your plugins, and for each plugin, a subdirectory per function. Every function which is mapped to our prompts will need two files:</p>\n<ul>\n<li><code class=\"language-text\">config.json</code> which contains a description, type, and the parameters for completion or chat depending on what you intend to use.</li>\n<li><code class=\"language-text\">skprompt.txt</code> which has the prompt in natural language.</li>\n</ul>\n<h2 id=\"plugin-setup\" style=\"position:relative;\"><a href=\"#plugin-setup\" aria-label=\"plugin setup permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Plugin setup</h2>\n<p>Let’s set our plugin and its function up. As mentioned we intend to generate either an Azure DevOps Pipeline, or GitHub Actions workflow, so one plugin and two function will do the job. Our directory structure will look like this:</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 307px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/40f98b10d1028af20e1bdfed583f50b2/4651d/dir.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 112.59259259259258%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAXCAYAAAALHW+jAAAACXBIWXMAABYlAAAWJQFJUiTwAAADvUlEQVR42oVV2XIaSRDUD0ggBmaY4RhOcd83SAQgDEjcQhgk79OGI/T/X5Cb1SDCrLD90HTR011dWVWZfaXrOjweDwzDULPb7Ybb44ZHZg5Zkz2apsHlcqk1sWWILd+8Xu9pXMXicaSSSQRtG9lcDrVaBclUCqVyBdlMFqlUEpFoFPf3D2g2m8hkMmh3OmjRzuXyCIfDKpgzh+lkArlSBYvZDIvFDP/+/In92zsG/SHGwwESd3cYDr9hvV5jNp9hMBhg87LB+/s/KObzCoVpmgeH4l3CNy0LpuGF0+lEIBhQG5y3tyfYkgaBrB3/+3w+5UDXjXPI4tC2Q4gzUr8/gDxvTCYSqBBykqmIRCIoFIvIpNO0o7CDwTMHn5GdHEpSQ+EIqpUKQqEQ1oSyIbTp8zN2uz2WiyWenib4vt9js9mgmMuqKP/v6ORQfiTKW5dUTcI3EWQUPr8fFg/JN4vpEAQ2C2easl+/6Ew5lA0ej4Fs1o9220YgYPKQRfh+VflSqaRsn+VTlwQCAcK2/+xQ0wy2hI3VKoq7hI2Hbg+jpymmE0LdfcfmdYvhoI/J5ImwX1n9Pp0GoBvGZcheVtfn47A8alH6LhqLqQIIzGazhVqlqmDHuC4RW5Z51n/nDr2GgplKZeBnOxxawTwxQdrKw7bR3Nohp7/k9oJDEzr7KhJL4OPjA9FoCOPRGG+7HWas8GO/h9V6hdFkhuWUYzlH//ERL4ReLuXVpb9W/OrUT7xNaCR2NptFo15Ho9HEHWEWiwVE4gk8kHI5tk2a9MtzLRoJf4F9cijQJMnCAO0oDBqZcUu2CEPku8PhUPCFTTc3DvXtC2TZGIvFGU1DsWK+XLOZ59jvtxiNR2zuN8wXK6xXC/J5iNftFr3HISajEavd+9KTKkJJbjBoq8LkC0XSroxCIU87j263SwWqo0i7Wq2iVq+hUq2hXCyhQnaZXuMyUyyLnA6a1EGN0JxwEp7MMm5oC2yBfH19rWbXURP/2tixOAWiUGIkDaV5a1a4wbnEItRZKNFCidR/VJvfUi+d8fOAn0IRIAXvVZ66PNxjnvbvPxRrRAefKRpN5jtEphiG93eNfdA1wzg0qlTRoSA7VDXVM8Dky7pAlllS4NH1yw4PEhYlvCUlLEhINUr+PZ+BMpuXySdEKYQIRbvdol1hGlpIpxIHtf5aFJ1VDmHEVgiRu31C25IJq/ULOq0mZrMpWp0etqsVxuNv6PB9mc7nyGVTZ/J/Btl7fPXE/twknP189T5lX+zDC+m+KA7/AWutkDO1c7y9AAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Prompt directory structure\"\n        title=\"\"\n        src=\"/static/40f98b10d1028af20e1bdfed583f50b2/4651d/dir.png\"\n        srcset=\"/static/40f98b10d1028af20e1bdfed583f50b2/01bf6/dir.png 270w,\n/static/40f98b10d1028af20e1bdfed583f50b2/4651d/dir.png 307w\"\n        sizes=\"(max-width: 307px) 100vw, 307px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p><em>DevOps</em> is the name of our plugin, and <em>AzDevOps</em> and <em>GitHubActions</em> are our function names.</p>\n<h2 id=\"prompt-text\" style=\"position:relative;\"><a href=\"#prompt-text\" aria-label=\"prompt text permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Prompt text</h2>\n<p>You can write your prompts however you like, just make sure you follow the principles of <a href=\"https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/prompt-engineering\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">prompt engineering</a> which in short is all about the details and be as specific as you can.</p>\n<p>Here is how mine looks like for GitHub Actions:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"87938588507227000000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`INSTRUCTIONS:\r\n\r\nGenerate workflow YAML files to deploy an application to Azure from GitHub Actions.\r\n\r\nRULES:\r\n\r\n- All YAML files must be complete\r\n- YAML files must be listed one by one\r\n- Every file is indicated with &quot;FILE:&quot; followed by it's path\r\n- Every file content must begin and end with #-----#\r\n- All pipelines should use either GitHub hosted runners with latest ubuntu version.\r\n- All YAML files should contain two stages for build and deploy where deploy depends on build\r\n\r\nDESCRIPTION:{{\\$input}}`, `87938588507227000000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"txt\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-txt line-numbers\"><code class=\"language-txt\">INSTRUCTIONS:\r\n\r\nGenerate workflow YAML files to deploy an application to Azure from GitHub Actions.\r\n\r\nRULES:\r\n\r\n- All YAML files must be complete\r\n- YAML files must be listed one by one\r\n- Every file is indicated with \"FILE:\" followed by it's path\r\n- Every file content must begin and end with #-----#\r\n- All pipelines should use either GitHub hosted runners with latest ubuntu version.\r\n- All YAML files should contain two stages for build and deploy where deploy depends on build\r\n\r\nDESCRIPTION:{{$input}}</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>The details of how the workflow is going to be generated is outlined in details and at the end I have left a placeholder for a variable called <code class=\"language-text\">$input</code> which will be passed by the user to the kernel later.</p>\n<p>And here is what the <code class=\"language-text\">config.json</code> looks like for this prompt:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"88941871565608420000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`{\r\n  &quot;schema&quot;: 1,\r\n  &quot;description&quot;: &quot;Create pipeline YAML files for GitHub Actions&quot;,\r\n  &quot;type&quot;: &quot;completion&quot;,\r\n  &quot;completion&quot;: {\r\n    &quot;max_tokens&quot;: 1000,\r\n    &quot;temperature&quot;: 0.5,\r\n    &quot;top_p&quot;: 0,\r\n    &quot;presence_penalty&quot;: 0,\r\n    &quot;frequency_penalty&quot;: 0\r\n  },\r\n  &quot;input&quot;: {\r\n    &quot;parameters&quot;: [\r\n      {\r\n        &quot;name&quot;: &quot;input&quot;,\r\n        &quot;description&quot;: &quot;The description of the deployment to be be created&quot;,\r\n        &quot;defaultValue&quot;: &quot;&quot;\r\n      }\r\n    ]\r\n  }\r\n}`, `88941871565608420000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"json\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-json line-numbers\"><code class=\"language-json\"><span class=\"token punctuation\">{</span>\r\n  <span class=\"token property\">\"schema\"</span><span class=\"token operator\">:</span> <span class=\"token number\">1</span><span class=\"token punctuation\">,</span>\r\n  <span class=\"token property\">\"description\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Create pipeline YAML files for GitHub Actions\"</span><span class=\"token punctuation\">,</span>\r\n  <span class=\"token property\">\"type\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"completion\"</span><span class=\"token punctuation\">,</span>\r\n  <span class=\"token property\">\"completion\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n    <span class=\"token property\">\"max_tokens\"</span><span class=\"token operator\">:</span> <span class=\"token number\">1000</span><span class=\"token punctuation\">,</span>\r\n    <span class=\"token property\">\"temperature\"</span><span class=\"token operator\">:</span> <span class=\"token number\">0.5</span><span class=\"token punctuation\">,</span>\r\n    <span class=\"token property\">\"top_p\"</span><span class=\"token operator\">:</span> <span class=\"token number\">0</span><span class=\"token punctuation\">,</span>\r\n    <span class=\"token property\">\"presence_penalty\"</span><span class=\"token operator\">:</span> <span class=\"token number\">0</span><span class=\"token punctuation\">,</span>\r\n    <span class=\"token property\">\"frequency_penalty\"</span><span class=\"token operator\">:</span> <span class=\"token number\">0</span>\r\n  <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\r\n  <span class=\"token property\">\"input\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\r\n    <span class=\"token property\">\"parameters\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span>\r\n      <span class=\"token punctuation\">{</span>\r\n        <span class=\"token property\">\"name\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"input\"</span><span class=\"token punctuation\">,</span>\r\n        <span class=\"token property\">\"description\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"The description of the deployment to be be created\"</span><span class=\"token punctuation\">,</span>\r\n        <span class=\"token property\">\"defaultValue\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"\"</span>\r\n      <span class=\"token punctuation\">}</span>\r\n    <span class=\"token punctuation\">]</span>\r\n  <span class=\"token punctuation\">}</span>\r\n<span class=\"token punctuation\">}</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>You don’t need to know the details of the parameters for now, all that is important is the definition of the input parameter and the fact that we intend to use the completion feature of Azure OpenAI.</p>\n<h2 id=\"input\" style=\"position:relative;\"><a href=\"#input\" aria-label=\"input permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Input</h2>\n<p>For our inputs, I also would like to use files, but you don’t have to follow this convention, this just keeps the code clean and short so it’s more understandable for me and other beginners learning the concepts.</p>\n<p>I have created a folder called desc which includes two files one for an application written with <code class=\"language-text\">.Net 8</code> and one for a <code class=\"language-text\">node</code> based application.</p>\n<p>Here is the content of the <code class=\"language-text\">node</code> based input file:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"58426482567665050000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`This is an application written in NodeJs and has below components:\r\n\r\n- A front end app which is written in React and uses create-react-app starter. This will be hosted in an Azure Static Web App and is stored in the \\`frontend\\` directory.\r\n- A backend API which is going to be hosted in an Azure Function as the backend for the static web app in the \\`api\\` directory.\r\n- The API uses a Cosmos DB database as its datastore.`, `58426482567665050000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"txt\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-txt line-numbers\"><code class=\"language-txt\">This is an application written in NodeJs and has below components:\r\n\r\n- A front end app which is written in React and uses create-react-app starter. This will be hosted in an Azure Static Web App and is stored in the `frontend` directory.\r\n- A backend API which is going to be hosted in an Azure Function as the backend for the static web app in the `api` directory.\r\n- The API uses a Cosmos DB database as its datastore.</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<h2 id=\"setting-up-the-kernel\" style=\"position:relative;\"><a href=\"#setting-up-the-kernel\" aria-label=\"setting up the kernel permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Setting up the kernel</h2>\n<p>In order to setup the kernel we need a few things:</p>\n<ul>\n<li>The information about the Azure OpenAI service like endpoint, key and model number.</li>\n<li>A way for the user to specify which input and prompt to use.</li>\n<li>Setting up the kernel so it knows about our Azure OpenAI service and our plugin directory.</li>\n<li>Calling the kernel and getting the result.</li>\n</ul>\n<p>We already covered how to setup the Azure OpenAI part with the kernel in our first post, here I just show you how to load the plugins from the directory:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"2496903402599359500\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`//reading the name of the plugin directory from our configuration\r\nvar pluginDirectories = Configuration!.GetSection(&quot;PluginSettings:Root&quot;).Get<string>();\r\n\r\n// loading the plugins from the plugin directory\r\nvar skillImport = kernel.ImportPluginFromPromptDirectory(pluginDirectories!);\r\n\r\n// read user's task description from given file\r\nstring description = await File.ReadAllTextAsync(file.FullName!);\r\n\r\n// this is a data structure that holds temporary data while the kernel task runs\r\nvar context = new KernelArguments();\r\n\r\n// associate user's description with &quot;input&quot; variable\r\nstring key = &quot;input&quot;;\r\ncontext.Add(key, description);\r\n\r\n// call the kernel and tell it which plugin function to call and pass to the LLM\r\nvar result = await kernel.InvokeAsync(skillImport[function], context);\r\nConsole.WriteLine(result.GetValue<string>());`, `2496903402599359500`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"csharp\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-csharp line-numbers\"><code class=\"language-csharp\"><span class=\"token comment\">//reading the name of the plugin directory from our configuration</span>\r\n<span class=\"token class-name\"><span class=\"token keyword\">var</span></span> pluginDirectories <span class=\"token operator\">=</span> Configuration<span class=\"token operator\">!</span><span class=\"token punctuation\">.</span><span class=\"token function\">GetSection</span><span class=\"token punctuation\">(</span><span class=\"token string\">\"PluginSettings:Root\"</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span><span class=\"token generic-method\"><span class=\"token function\">Get</span><span class=\"token generic class-name\"><span class=\"token punctuation\">&lt;</span><span class=\"token keyword\">string</span><span class=\"token punctuation\">></span></span></span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\r\n\r\n<span class=\"token comment\">// loading the plugins from the plugin directory</span>\r\n<span class=\"token class-name\"><span class=\"token keyword\">var</span></span> skillImport <span class=\"token operator\">=</span> kernel<span class=\"token punctuation\">.</span><span class=\"token function\">ImportPluginFromPromptDirectory</span><span class=\"token punctuation\">(</span>pluginDirectories<span class=\"token operator\">!</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\r\n\r\n<span class=\"token comment\">// read user's task description from given file</span>\r\n<span class=\"token class-name\"><span class=\"token keyword\">string</span></span> description <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> File<span class=\"token punctuation\">.</span><span class=\"token function\">ReadAllTextAsync</span><span class=\"token punctuation\">(</span>file<span class=\"token punctuation\">.</span>FullName<span class=\"token operator\">!</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\r\n\r\n<span class=\"token comment\">// this is a data structure that holds temporary data while the kernel task runs</span>\r\n<span class=\"token class-name\"><span class=\"token keyword\">var</span></span> context <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token constructor-invocation class-name\">KernelArguments</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\r\n\r\n<span class=\"token comment\">// associate user's description with \"input\" variable</span>\r\n<span class=\"token class-name\"><span class=\"token keyword\">string</span></span> key <span class=\"token operator\">=</span> <span class=\"token string\">\"input\"</span><span class=\"token punctuation\">;</span>\r\ncontext<span class=\"token punctuation\">.</span><span class=\"token function\">Add</span><span class=\"token punctuation\">(</span>key<span class=\"token punctuation\">,</span> description<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\r\n\r\n<span class=\"token comment\">// call the kernel and tell it which plugin function to call and pass to the LLM</span>\r\n<span class=\"token class-name\"><span class=\"token keyword\">var</span></span> result <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> kernel<span class=\"token punctuation\">.</span><span class=\"token function\">InvokeAsync</span><span class=\"token punctuation\">(</span>skillImport<span class=\"token punctuation\">[</span>function<span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span> context<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\r\nConsole<span class=\"token punctuation\">.</span><span class=\"token function\">WriteLine</span><span class=\"token punctuation\">(</span>result<span class=\"token punctuation\">.</span><span class=\"token generic-method\"><span class=\"token function\">GetValue</span><span class=\"token generic class-name\"><span class=\"token punctuation\">&lt;</span><span class=\"token keyword\">string</span><span class=\"token punctuation\">></span></span></span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<h2 id=\"output\" style=\"position:relative;\"><a href=\"#output\" aria-label=\"output permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Output</h2>\n<p>You can find the <a href=\"https://github.com/yashints/semantic-kernel-devops\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">full code for this post here</a>. Simply clone the code, build and run it passing the required information like so:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"78469817111826860000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`git clone https://github.com/yashints/semantic-kernel-devops.git\r\n\r\ncd semantic-kernel-devops\r\n\r\ndotnet restore\r\n\r\ndotnet build\r\n\r\ndotnet run -- -i .\\desc\\dotnet.txt -f GitHubActions`, `78469817111826860000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\"><span class=\"token function\">git</span> clone https://github.com/yashints/semantic-kernel-devops.git\r\n\r\n<span class=\"token builtin class-name\">cd</span> semantic-kernel-devops\r\n\r\ndotnet restore\r\n\r\ndotnet build\r\n\r\ndotnet run -- <span class=\"token parameter variable\">-i</span> .<span class=\"token punctuation\">\\</span>desc<span class=\"token punctuation\">\\</span>dotnet.txt <span class=\"token parameter variable\">-f</span> GitHubActions</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>I am passing the <code class=\"language-text\">.Net</code> application prompt and tell the kernel to create a GitHub Actions workflow.</p>\n<p>The result will look like this:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"94530943011715860000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`FILE: .github/workflows/dotnet.yml\r\n#-----#\r\nname: Build and Deploy\r\n\r\non:\r\n  push:\r\n    branches:\r\n      - master\r\n\r\njobs:\r\n  build:\r\n    name: Build\r\n    runs-on: ubuntu-latest\r\n    strategy:\r\n      matrix:\r\n        dotnet-version: ['8.x']\r\n        \r\n    steps:\r\n    - name: Checkout code\r\n      uses: actions/checkout@v2\r\n      \r\n    - name: Setup .NET Core\r\n      uses: actions/setup-dotnet@v1\r\n      with:\r\n        dotnet-version: \\${{ matrix.dotnet-version }}\r\n\r\n    - name: Restore dependencies\r\n      run: dotnet restore\r\n      \r\n    - name: Build\r\n      run: dotnet build --configuration Release --no-restore\r\n      \r\n    - name: Test\r\n      run: dotnet test --no-restore --verbosity normal\r\n\r\n  deploy:\r\n    needs: build\r\n    runs-on: ubuntu-latest\r\n    steps:\r\n    - name: Login via Az module\r\n      uses: azure/login@v1\r\n      with:\r\n        creds: \\${{ secrets.AZURE_CREDENTIALS }}\r\n\r\n    - name: 'Run Azure Functions Action'\r\n      uses: Azure/functions-action@v1\r\n      id: fa\r\n      with:\r\n        app-name: 'myFunctionApp'\r\n        package: 'api'\r\n        publish-profile: \\${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }}\r\n\r\n    - name: 'Deploy to Azure Web App'\r\n      uses: azure/webapps-deploy@v2\r\n      with:\r\n        app-name: 'myWebApp'\r\n        package: 'frontend'\r\n        publish-profile: \\${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}\r\n#-----#`, `94530943011715860000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"yaml\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-yaml line-numbers\"><code class=\"language-yaml\"><span class=\"token key atrule\">FILE</span><span class=\"token punctuation\">:</span> .github/workflows/dotnet.yml\r\n<span class=\"token comment\">#-----#</span>\r\n<span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> Build and Deploy\r\n\r\n<span class=\"token key atrule\">on</span><span class=\"token punctuation\">:</span>\r\n  <span class=\"token key atrule\">push</span><span class=\"token punctuation\">:</span>\r\n    <span class=\"token key atrule\">branches</span><span class=\"token punctuation\">:</span>\r\n      <span class=\"token punctuation\">-</span> master\r\n\r\n<span class=\"token key atrule\">jobs</span><span class=\"token punctuation\">:</span>\r\n  <span class=\"token key atrule\">build</span><span class=\"token punctuation\">:</span>\r\n    <span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> Build\r\n    <span class=\"token key atrule\">runs-on</span><span class=\"token punctuation\">:</span> ubuntu<span class=\"token punctuation\">-</span>latest\r\n    <span class=\"token key atrule\">strategy</span><span class=\"token punctuation\">:</span>\r\n      <span class=\"token key atrule\">matrix</span><span class=\"token punctuation\">:</span>\r\n        <span class=\"token key atrule\">dotnet-version</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">[</span><span class=\"token string\">'8.x'</span><span class=\"token punctuation\">]</span>\r\n        \r\n    <span class=\"token key atrule\">steps</span><span class=\"token punctuation\">:</span>\r\n    <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> Checkout code\r\n      <span class=\"token key atrule\">uses</span><span class=\"token punctuation\">:</span> actions/checkout@v2\r\n      \r\n    <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> Setup .NET Core\r\n      <span class=\"token key atrule\">uses</span><span class=\"token punctuation\">:</span> actions/setup<span class=\"token punctuation\">-</span>dotnet@v1\r\n      <span class=\"token key atrule\">with</span><span class=\"token punctuation\">:</span>\r\n        <span class=\"token key atrule\">dotnet-version</span><span class=\"token punctuation\">:</span> $<span class=\"token punctuation\">{</span><span class=\"token punctuation\">{</span> matrix.dotnet<span class=\"token punctuation\">-</span>version <span class=\"token punctuation\">}</span><span class=\"token punctuation\">}</span>\r\n\r\n    <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> Restore dependencies\r\n      <span class=\"token key atrule\">run</span><span class=\"token punctuation\">:</span> dotnet restore\r\n      \r\n    <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> Build\r\n      <span class=\"token key atrule\">run</span><span class=\"token punctuation\">:</span> dotnet build <span class=\"token punctuation\">-</span><span class=\"token punctuation\">-</span>configuration Release <span class=\"token punctuation\">-</span><span class=\"token punctuation\">-</span>no<span class=\"token punctuation\">-</span>restore\r\n      \r\n    <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> Test\r\n      <span class=\"token key atrule\">run</span><span class=\"token punctuation\">:</span> dotnet test <span class=\"token punctuation\">-</span><span class=\"token punctuation\">-</span>no<span class=\"token punctuation\">-</span>restore <span class=\"token punctuation\">-</span><span class=\"token punctuation\">-</span>verbosity normal\r\n\r\n  <span class=\"token key atrule\">deploy</span><span class=\"token punctuation\">:</span>\r\n    <span class=\"token key atrule\">needs</span><span class=\"token punctuation\">:</span> build\r\n    <span class=\"token key atrule\">runs-on</span><span class=\"token punctuation\">:</span> ubuntu<span class=\"token punctuation\">-</span>latest\r\n    <span class=\"token key atrule\">steps</span><span class=\"token punctuation\">:</span>\r\n    <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> Login via Az module\r\n      <span class=\"token key atrule\">uses</span><span class=\"token punctuation\">:</span> azure/login@v1\r\n      <span class=\"token key atrule\">with</span><span class=\"token punctuation\">:</span>\r\n        <span class=\"token key atrule\">creds</span><span class=\"token punctuation\">:</span> $<span class=\"token punctuation\">{</span><span class=\"token punctuation\">{</span> secrets.AZURE_CREDENTIALS <span class=\"token punctuation\">}</span><span class=\"token punctuation\">}</span>\r\n\r\n    <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> <span class=\"token string\">'Run Azure Functions Action'</span>\r\n      <span class=\"token key atrule\">uses</span><span class=\"token punctuation\">:</span> Azure/functions<span class=\"token punctuation\">-</span>action@v1\r\n      <span class=\"token key atrule\">id</span><span class=\"token punctuation\">:</span> fa\r\n      <span class=\"token key atrule\">with</span><span class=\"token punctuation\">:</span>\r\n        <span class=\"token key atrule\">app-name</span><span class=\"token punctuation\">:</span> <span class=\"token string\">'myFunctionApp'</span>\r\n        <span class=\"token key atrule\">package</span><span class=\"token punctuation\">:</span> <span class=\"token string\">'api'</span>\r\n        <span class=\"token key atrule\">publish-profile</span><span class=\"token punctuation\">:</span> $<span class=\"token punctuation\">{</span><span class=\"token punctuation\">{</span> secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE <span class=\"token punctuation\">}</span><span class=\"token punctuation\">}</span>\r\n\r\n    <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> <span class=\"token string\">'Deploy to Azure Web App'</span>\r\n      <span class=\"token key atrule\">uses</span><span class=\"token punctuation\">:</span> azure/webapps<span class=\"token punctuation\">-</span>deploy@v2\r\n      <span class=\"token key atrule\">with</span><span class=\"token punctuation\">:</span>\r\n        <span class=\"token key atrule\">app-name</span><span class=\"token punctuation\">:</span> <span class=\"token string\">'myWebApp'</span>\r\n        <span class=\"token key atrule\">package</span><span class=\"token punctuation\">:</span> <span class=\"token string\">'frontend'</span>\r\n        <span class=\"token key atrule\">publish-profile</span><span class=\"token punctuation\">:</span> $<span class=\"token punctuation\">{</span><span class=\"token punctuation\">{</span> secrets.AZURE_WEBAPP_PUBLISH_PROFILE <span class=\"token punctuation\">}</span><span class=\"token punctuation\">}</span>\r\n<span class=\"token comment\">#-----#</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>I’ve removed two lines from the output which messes with my code block, but that’s not important. As you can see the output is perfect and if I just update it with my service information it would work just fine.</p>\n<div class=\"custom-block info\"><div class=\"custom-block-body\"> <strong>Note:</strong> You need to update the <code class=\"language-text\">appsettings.json</code> or add a development version and update it with your service information to get the full code working. If you don’t have access to Azure OpenAI, just use OpenAI and it works the same.</div></div>\n<h2 id=\"what-next\" style=\"position:relative;\"><a href=\"#what-next\" aria-label=\"what next permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What next?</h2>\n<p>So far we have created our prompts, dynamically loaded them as plugins and functions and then called our kernel passing the input to be passed to our LLM. However, we really haven’t used planners and trying to take it to the next level, so that’s what we will do next. If you liked this post, please share and spread the word too.</p>","timeToRead":6,"frontmatter":{"unformattedDate":"2024-05-13T00:00:00.000Z","date":"May 13, 2024","title":"Semantic kernel series - Part two - Plugins","subtitle":null,"id":null,"author":"Yaser Adel Mehraban","gravatar":null,"canonical_url":null,"tags":["semantickernel","AI","OpenAi","plugins"],"thumbnail":{"childImageSharp":{"gatsbyImageData":{"layout":"constrained","placeholder":{"fallback":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAABYlAAAWJQFJUiTwAAACJElEQVR42mWSS28TMRSF81/5B6yQWCFA7NiwQEgtCKWsEooCNCgpoVmkNI8mbRXoCwV1ans843lkyERK85gcfG+VopaRrLE919+ce3xyuPOkaYowDBEPY8RxzHOpJA8hJYIw4G+0H4URvyeTyc353F2gMQZKKsgLCS01PM/D2ckZ+kd9nJ/9grgQvE+gIAjgOA6SJLkNXCwWmM1mmM/mUEohHacYNAcoPC5gZ20HnWIHxSdF1NfraBVaeP+0iN38LtJhiktxyfD5fI4sy66BBFsulzx83+eC4+/HqL6uollqovtlH9/ebqP9qYVOuYPqmyp6lR5i27KQghWSKILmMgtJrKLJdMqS2TMh4bougiiACX1oo6FjAy+yc1/bPQMTGbjahbS+jkYjTO158jK35/zGo3oFL9sNXFmlURTZC1BcLKyXoaew/UPjXinEqz0fgbb+2n2yhn4qhOAOa7UayuUycvLPEFsnfRA4W2ascFVMYN9VaP908XzLx+e2vSS7luIfkBSOx2M+NxgMbnt407ItouEFHszQxiQxSCKJOLI2xAG3TMBVHbVMF8IeEuTK9k8LglJMqG163FMXnVIHzQ8tHHw9Qq96gH27PiwfInRCrqGIUV5XSWEggWhBg/68ikH3Yxf5B3lsPHyHxkYDlRcVrN1fx+azTahTxUDKIWWXFBLnv2BTBMgb3/h8y1pruMplJZ7vXftmUyAcwd3Qd/JwFey/m20pUEgeM6QAAAAASUVORK5CYII="},"backgroundColor":"transparent","images":{"fallback":{"src":"/static/5d276e3388107f4c25e22e895f6d8490/97211/sk.png","srcSet":"/static/5d276e3388107f4c25e22e895f6d8490/6aa3c/sk.png 750w,\n/static/5d276e3388107f4c25e22e895f6d8490/f9352/sk.png 1080w,\n/static/5d276e3388107f4c25e22e895f6d8490/91ff4/sk.png 1366w,\n/static/5d276e3388107f4c25e22e895f6d8490/97211/sk.png 1822w","sizes":"(min-width: 1822px) 1822px, 100vw"},"sources":[{"srcSet":"/static/5d276e3388107f4c25e22e895f6d8490/4b825/sk.webp 750w,\n/static/5d276e3388107f4c25e22e895f6d8490/8989a/sk.webp 1080w,\n/static/5d276e3388107f4c25e22e895f6d8490/b35cf/sk.webp 1366w,\n/static/5d276e3388107f4c25e22e895f6d8490/e992f/sk.webp 1822w","type":"image/webp","sizes":"(min-width: 1822px) 1822px, 100vw"}]},"width":1822,"height":1029}}},"cover":{"childImageSharp":{"gatsbyImageData":{"layout":"constrained","placeholder":{"fallback":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAIAAAA7N+mxAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB6ElEQVR42h2NyY7TQBRF/c9I/ARLVrBgwwq2oB5QNxLdwXZiO24nHTzPLs9V5aE8Jo4ot3R0dfSe7nvMwUdaSvS8M/Leg0OIxxANFH9ldMsBVGNSj3E9UcmaGdRTgAeABi9vGCluDDi9BEgJsRIiFWAra4xkTQ1gu+j1uHYK4mR1jAc3rcx11Zb9NUIDw4JaSrs74XTHK7es8ij8e5L138LxWTEftgfFybiDxR6tx91BdlJWMW6ethtFT9rFL3uGiyqpGBR41tHFrS5+cwnaBXTXsF1icg2bJWivEVlCcnXoiizUfbIY6KymhOFAJWW94FWCg+WgOcWdWYwunv3qHDUXWnbwvIImG00WnFw0GXDU4PyatAxnF5JTCSaSvFryW8reb49hS0/YcKaY5azDWcezhtZcpZx0NB8T+lnLZBe/OFCwMWvkrJ5xRin4LUVcIWJARNCJ+bhH8w7Mf51pn40nSMstw9tY2PCH+x+8lt7y6k/29Et29/GwNkMiRmTNkAhBK+f91++Xd+/Pm4AemgTQMKJX3Txwnz5+3lrlzoFbF239SgK9FBIpeoMK/Qy6l7T7dj9++DLvklEuRs7FzOY1YvXij5rzVsmZBWdDzkW8kfFawuspr9LMOGcdUnZeIUZvbqNnNf0PLeoPWB7eedUAAAAASUVORK5CYII="},"backgroundColor":"transparent","images":{"fallback":{"src":"/static/9dd7e334f99df27d871a581fa1226847/a2195/socialpreview.png","srcSet":"/static/9dd7e334f99df27d871a581fa1226847/cadb4/socialpreview.png 750w,\n/static/9dd7e334f99df27d871a581fa1226847/a2195/socialpreview.png 800w","sizes":"(min-width: 800px) 800px, 100vw"},"sources":[{"srcSet":"/static/9dd7e334f99df27d871a581fa1226847/11ba1/socialpreview.webp 750w,\n/static/9dd7e334f99df27d871a581fa1226847/5f042/socialpreview.webp 800w","type":"image/webp","sizes":"(min-width: 800px) 800px, 100vw"}]},"width":800,"height":400}}},"img":{"publicURL":"/static/5d276e3388107f4c25e22e895f6d8490/sk.png"},"socialPreview":{"publicURL":"/static/9dd7e334f99df27d871a581fa1226847/socialpreview.png"}}}},"pageContext":{"title":"Semantic kernel series - Part two - Plugins","postPath":"/blog/2024/05/13/semantic-kernel-plugins","nextPost":"/blog/2024/05/27/semantic-kernel-planners","previousPost":"/blog/2024/04/30/semantic-kernel"}},"staticQueryHashes":[],"slicesMap":{}}