From f34ba9af5371c0b58e14b3eee1f2b6420043fef2 Mon Sep 17 00:00:00 2001 From: Matthew Bolanos Date: Wed, 13 Dec 2023 06:24:59 +0000 Subject: [PATCH] update inline sample --- semantic-kernel/agents/plugins/openai-plugins.md | 2 +- .../agents/plugins/out-of-the-box-plugins.md | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/semantic-kernel/agents/plugins/openai-plugins.md b/semantic-kernel/agents/plugins/openai-plugins.md index 77f1521c..4bbe671e 100644 --- a/semantic-kernel/agents/plugins/openai-plugins.md +++ b/semantic-kernel/agents/plugins/openai-plugins.md @@ -93,7 +93,7 @@ At this point, you should have five HTTP endpoints in your Azure Function projec ``` 2. Open a browser and navigate to _http://localhost:7071/swagger/ui_. You should see the Swagger UI page load. - :::image type="content" source="../../../media/swagger-ui.png" alt-text="Swagger UI"::: + :::image type="content" source="../../media/swagger-ui.png" alt-text="Swagger UI"::: 3. Test each of the endpoints by clicking the __Try it out__ button and by providing input values. diff --git a/semantic-kernel/agents/plugins/out-of-the-box-plugins.md b/semantic-kernel/agents/plugins/out-of-the-box-plugins.md index 8c8ba6a0..d0f6fb10 100644 --- a/semantic-kernel/agents/plugins/out-of-the-box-plugins.md +++ b/semantic-kernel/agents/plugins/out-of-the-box-plugins.md @@ -39,11 +39,11 @@ When using a core plugin, be sure to include a `using Microsoft.SemanticKernel.C ```csharp using Microsoft.SemanticKernel.CoreSkills; -// ... instantiate a kernel and configure it first +// Instantiate a kernel and configure it -kernel.ImportFunctions(new TimePlugin(), "time"); +kernel.AddFromType(); -const string ThePromptTemplate = @" +const string promptTemplate = @" Today is: {{time.Date}} Current time is: {{time.Time}} @@ -51,10 +51,8 @@ Answer to the following questions using JSON syntax, including the data used. Is it morning, afternoon, evening, or night (morning/afternoon/evening/night)? Is it weekend time (weekend/not weekend)?"; -var myKindOfDay = kernel.CreateSemanticFunction(ThePromptTemplate, maxTokens: 150); - -var myOutput = await myKindOfDay.InvokeAsync(); -Console.WriteLine(myOutput); +var results = await myKindOfDay.InvokePromptAsync(promptTemplate); +Console.WriteLine(results); ```