Skip to content

Commit

Permalink
update inline sample
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewbolanos committed Dec 13, 2023
1 parent a269d7f commit f34ba9a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion semantic-kernel/agents/plugins/openai-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
12 changes: 5 additions & 7 deletions semantic-kernel/agents/plugins/out-of-the-box-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,20 @@ 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<TimePlugin>();

const string ThePromptTemplate = @"
const string promptTemplate = @"
Today is: {{time.Date}}
Current time is: {{time.Time}}
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);
```


Expand Down

0 comments on commit f34ba9a

Please sign in to comment.