-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Semantic Kernel sample projects from build 2024 (#69)
* Add hello semantic-keren project * Add Chat history project * Add Adding Plugins (Function Calls) * Add plugins(Being search) * clean name * Add injecting servies sample project * Add Inject kerenel To WebApp. * Rename and clean project folders * Fix spelling/naming of project * Being -> Bing for API Key * Separate out the introduction of logging and cleaned up some naming * Update naming for 06 and 07 projects. * Update README.md Review update * Update Program.cs Review fix * review fix * Clean * disbaled warning from project * Update readme to have links into youtube * Fix ordering of projects to match video. * Update github links * Try escaping parenthesis * Try dashes * Try encoding urls * Check-in initial navigation and readme structure * update readme * clean markdown syntax * update readme of each project * Move docs to docs folder instead of the individual projects. * Update exercise files * clean 5 to 7 * Clean links * Clean formatting * Clean grammer and spellings * Build based on priviuse project * Prerequisites of OpenAI * Clean * clean some inconsistency * Review fixes * clean * Add readme * Add comment about redaction service. * Update README.md * update doc * Add some more docs * Update README.md Co-authored-by: Jordan Matthiesen <[email protected]> * Update README.md Co-authored-by: Jordan Matthiesen <[email protected]> * Update src/build-2024/docs/Exercise/04 Add Logging.md Co-authored-by: Jordan Matthiesen <[email protected]> * Update src/build-2024/docs/Exercise/05 Add Plugin (Bing Search).md Co-authored-by: Jordan Matthiesen <[email protected]> * Update src/build-2024/docs/Exercise/06 Modifying Kernel Behavior with Dependency Injection.md Co-authored-by: Jordan Matthiesen <[email protected]> * Update src/build-2024/docs/Exercise/07 Using Semantic Kernel in WebApp.md Co-authored-by: Jordan Matthiesen <[email protected]> * Update src/build-2024/docs/Exercise/06 Modifying Kernel Behavior with Dependency Injection.md Co-authored-by: Jordan Matthiesen <[email protected]> * update version * Clean concept notes * Update src/build-2024/docs/Exercise/01 Hello Semantic Kernel.md Co-authored-by: Jordan Matthiesen <[email protected]> * Update src/build-2024/docs/Exercise/01 Hello Semantic Kernel.md Co-authored-by: Jordan Matthiesen <[email protected]> * Update src/build-2024/docs/Exercise/04 Add Logging.md Co-authored-by: Jordan Matthiesen <[email protected]> * Update src/build-2024/docs/Exercise/01 Hello Semantic Kernel.md Co-authored-by: Jordan Matthiesen <[email protected]> * Update src/build-2024/docs/Exercise/02 Add Chat History.md Co-authored-by: Jordan Matthiesen <[email protected]> * Update src/build-2024/docs/Exercise/03 Add Plugin (Function Call).md Co-authored-by: Jordan Matthiesen <[email protected]> * Update src/build-2024/docs/Exercise/03 Add Plugin (Function Call).md Co-authored-by: Jordan Matthiesen <[email protected]> * Update src/build-2024/docs/Exercise/02 Add Chat History.md Co-authored-by: Jordan Matthiesen <[email protected]> --------- Co-authored-by: Jake Radzikowski <[email protected]> Co-authored-by: Jordan Matthiesen <[email protected]>
- Loading branch information
1 parent
0fd70fa
commit 922a8cc
Showing
35 changed files
with
1,290 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/build-2024/01 - Hello Semantic Kernel/01 - Hello Semantic Kernel.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.SemanticKernel" Version="1.15.0" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Microsoft.SemanticKernel; | ||
|
||
var openAIChatCompletionModelName = "gpt-3.5-turbo"; // this could be other models like "gpt-4o". | ||
var kernel = Kernel.CreateBuilder() | ||
.AddOpenAIChatCompletion(openAIChatCompletionModelName, Environment.GetEnvironmentVariable("OPENAI_API_KEY")) // add the OpenAI chat completion service. | ||
.Build(); | ||
|
||
// Basic chat | ||
// This is zero memory or stateless chat. The AI will not remember anything from the previous messages. | ||
while (true) | ||
{ | ||
Console.Write("Q: "); | ||
Console.WriteLine(await kernel.InvokePromptAsync(Console.ReadLine()!)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Hello semantic kernel | ||
|
||
A complete documentation for this project is [here](../docs/Exercise/01%20Hello%20Semantic%20Kernel.md) |
11 changes: 11 additions & 0 deletions
11
src/build-2024/02 - Add Chat History/02 - Add Chat History.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.SemanticKernel" Version="1.15.0" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Microsoft.SemanticKernel; | ||
using Microsoft.SemanticKernel.ChatCompletion; | ||
|
||
var openAIChatCompletionModelName = "gpt-3.5-turbo"; // this could be other models like "gpt-4o". | ||
var kernel = Kernel.CreateBuilder() | ||
.AddOpenAIChatCompletion(openAIChatCompletionModelName, Environment.GetEnvironmentVariable("OPENAI_API_KEY")) // add the OpenAI chat completion service. | ||
.Build(); | ||
|
||
var chatService = kernel.GetRequiredService<IChatCompletionService>(); | ||
ChatHistory chatHistory = []; | ||
|
||
// Basic chat | ||
while (true) | ||
{ | ||
Console.Write("Q: "); | ||
chatHistory.AddUserMessage(Console.ReadLine()); // Add user message to chat history. | ||
var response = await chatService.GetChatMessageContentAsync(chatHistory); // Get chat response based on chat history. | ||
Console.WriteLine(response); // Print response. | ||
chatHistory.Add(response); // Add chat response to chat history | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
# Add Chat History | ||
|
||
A complete documentation for this project is [here](../docs/Exercise/02%20Add%20Chat%20History.md) |
12 changes: 12 additions & 0 deletions
12
src/build-2024/03 - Add Plugin (Function Call)/03 - Add Plugin (Function Call).csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.SemanticKernel" Version="1.15.0" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using Microsoft.SemanticKernel; | ||
using Microsoft.SemanticKernel.ChatCompletion; | ||
using Microsoft.SemanticKernel.Connectors.OpenAI; | ||
|
||
var openAIChatCompletionModelName = "gpt-3.5-turbo"; // this could be other models like "gpt-4o". | ||
|
||
var kernel = Kernel.CreateBuilder() | ||
.AddOpenAIChatCompletion(openAIChatCompletionModelName, Environment.GetEnvironmentVariable("OPENAI_API_KEY")) // add the OpenAI chat completion service. | ||
.Build(); | ||
|
||
// Import the DemographicInfo class to the kernel, so it can be used in the chat completion service. | ||
// this plugin could be from other options such as functions, prompts directory, etc. | ||
kernel.ImportPluginFromType<DemographicInfo>(); | ||
var settings = new OpenAIPromptExecutionSettings() { ToolCallBehavior = ToolCallBehavior.AutoInvokeKernelFunctions };// Set the settings for the chat completion service. | ||
var chatService = kernel.GetRequiredService<IChatCompletionService>(); | ||
ChatHistory chatHistory = []; | ||
|
||
// Basic chat | ||
while (true) | ||
{ | ||
Console.Write("Q: "); | ||
chatHistory.AddUserMessage(Console.ReadLine());// Add user message to chat history, then it can be use to get more context for the next chat response | ||
|
||
var response = await chatService.GetChatMessageContentAsync(chatHistory, settings, kernel);// Get chat response based on chat history | ||
|
||
Console.WriteLine(response); | ||
chatHistory.Add(response);// Add chat response to chat history, hence it can be use to get more context for the next chat response | ||
} | ||
|
||
class DemographicInfo | ||
{ | ||
[KernelFunction] | ||
public int GetAge(string name) | ||
{ | ||
return name switch | ||
{ | ||
"Alice" => 25, | ||
"Bob" => 30, | ||
_ => 0 | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Add Plugin (Function Call) | ||
|
||
A complete documentation for this project is [here](../docs/Exercise/03%20Add%20Plugin%20(Function%20Call).md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0-preview.4.24266.19" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.0-preview.4.24266.19" /> | ||
<PackageReference Include="Microsoft.SemanticKernel" Version="1.15.0" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.Extensions.Logging; | ||
using Microsoft.SemanticKernel; | ||
using Microsoft.SemanticKernel.ChatCompletion; | ||
|
||
var openAIChatCompletionModelName = "gpt-3.5-turbo"; // this could be other models like "gpt-4o". | ||
|
||
var builder = Kernel.CreateBuilder(); | ||
|
||
// Add logging services to the builder | ||
builder.Services.AddLogging(b => b.AddConsole().SetMinimumLevel(LogLevel.Trace)); | ||
|
||
var kernel = builder | ||
.AddOpenAIChatCompletion(openAIChatCompletionModelName, Environment.GetEnvironmentVariable("OPENAI_API_KEY")) // add the OpenAI chat completion service. | ||
.Build(); | ||
|
||
var chatService = kernel.GetRequiredService<IChatCompletionService>(); | ||
ChatHistory chatHistory = []; | ||
|
||
// Basic chat | ||
while (true) | ||
{ | ||
Console.Write("Q: "); | ||
chatHistory.AddUserMessage(Console.ReadLine());// Add user message to chat history, then it can be use to get more context for the next chat response | ||
|
||
var response = await chatService.GetChatMessageContentAsync(chatHistory);// Get chat response based on chat history | ||
|
||
Console.WriteLine(response); | ||
chatHistory.Add(response);// Add chat response to chat history, hence it can be use to get more context for the next chat response | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Add Logging | ||
|
||
A complete documentation for this project is [here](../docs/Exercise/04%20Add%20Logging.md) |
17 changes: 17 additions & 0 deletions
17
src/build-2024/05 - Add Plugin (Bing Search)/05 - Add Plugin (Bing Search).csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<NoWarn>SKEXP0050</NoWarn> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0-preview.4.24266.19" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.0-preview.4.24266.19" /> | ||
<PackageReference Include="Microsoft.SemanticKernel" Version="1.15.0" /> | ||
<PackageReference Include="Microsoft.SemanticKernel.Plugins.Web" Version="1.14.1-alpha" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.Extensions.Logging; | ||
using Microsoft.SemanticKernel; | ||
using Microsoft.SemanticKernel.ChatCompletion; | ||
using Microsoft.SemanticKernel.Connectors.OpenAI; | ||
using Microsoft.SemanticKernel.Plugins.Web; | ||
using Microsoft.SemanticKernel.Plugins.Web.Bing; | ||
|
||
var openAIChatCompletionModelName = "gpt-3.5-turbo"; // this could be other models like "gpt-4o". | ||
|
||
var builder = Kernel.CreateBuilder(); | ||
|
||
// Add logging services to the builder | ||
builder.Services.AddLogging(b => b.AddConsole().SetMinimumLevel(LogLevel.Trace)); | ||
|
||
var kernel = builder | ||
.AddOpenAIChatCompletion(openAIChatCompletionModelName, Environment.GetEnvironmentVariable("OPENAI_API_KEY")) // add the OpenAI chat completion service. | ||
.Build(); | ||
|
||
kernel.ImportPluginFromObject(new WebSearchEnginePlugin( | ||
new BingConnector(Environment.GetEnvironmentVariable("BING_API_KEY")))); | ||
|
||
var settings = new OpenAIPromptExecutionSettings() { ToolCallBehavior = ToolCallBehavior.AutoInvokeKernelFunctions };// Set the settings for the chat completion service. | ||
var chatService = kernel.GetRequiredService<IChatCompletionService>(); | ||
ChatHistory chatHistory = []; | ||
|
||
// Basic chat | ||
while (true) | ||
{ | ||
Console.Write("Q: "); | ||
chatHistory.AddUserMessage(Console.ReadLine());// Add user message to chat history, then it can be use to get more context for the next chat response | ||
|
||
var response = await chatService.GetChatMessageContentAsync(chatHistory, settings, kernel);// Get chat response based on chat history | ||
|
||
Console.WriteLine(response); | ||
chatHistory.Add(response);// Add chat response to chat history, hence it can be use to get more context for the next chat response | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Add Plugin (Bing Search) | ||
|
||
A complete documentation for this project is [here](../docs/Exercise/05%20Add%20Plugin%20(Bing%20Search).md) |
20 changes: 20 additions & 0 deletions
20
...with Dependency Injection/06 - Modifying Kernel Behavior with Dependency Injection.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<NoWarn>SKEXP0001,SKEXP0050</NoWarn> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.Compliance.Redaction" Version="9.0.0-preview.4.24271.2" /> | ||
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.0-preview.4.24266.19" /> | ||
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="9.0.0-preview.4.24271.2" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0-preview.4.24266.19" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.0-preview.4.24266.19" /> | ||
<PackageReference Include="Microsoft.SemanticKernel" Version="1.15.0" /> | ||
<PackageReference Include="Microsoft.SemanticKernel.Plugins.Web" Version="1.14.1-alpha" /> | ||
</ItemGroup> | ||
|
||
</Project> |
64 changes: 64 additions & 0 deletions
64
src/build-2024/06 - Modifying Kernel Behavior with Dependency Injection/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.Extensions.Logging; | ||
using Microsoft.Extensions.Http; | ||
using Microsoft.SemanticKernel; | ||
using Microsoft.SemanticKernel.ChatCompletion; | ||
using Microsoft.SemanticKernel.Connectors.OpenAI; | ||
using Microsoft.SemanticKernel.Plugins.Web.Bing; | ||
|
||
var openAIChatCompletionModelName = "gpt-3.5-turbo"; // this could be other models like "gpt-4o". | ||
|
||
var builder = Kernel.CreateBuilder(); | ||
|
||
// injecting services to the kernel such as logging, http client, redaction. | ||
builder.Services.AddLogging(b => b.AddConsole().SetMinimumLevel(LogLevel.Trace)); | ||
|
||
builder.Services.ConfigureHttpClientDefaults(b => | ||
{ | ||
b.AddStandardResilienceHandler(); | ||
b.RedactLoggedHeaders(["Authorization"]); | ||
}); | ||
builder.Services.AddRedaction();// Adds the redaction service, which will redact sensitive information from logs and other outputs. | ||
|
||
// injecting the permission filter to the kernel. | ||
builder.Services.AddSingleton<IFunctionInvocationFilter, PermissionFilter>(); | ||
|
||
var kernel = builder | ||
.AddOpenAIChatCompletion(openAIChatCompletionModelName, Environment.GetEnvironmentVariable("OPENAI_API_KEY")) // add the OpenAI chat completion service. | ||
.Build(); | ||
|
||
kernel.ImportPluginFromObject(new Microsoft.SemanticKernel.Plugins.Web.WebSearchEnginePlugin( | ||
new BingConnector(Environment.GetEnvironmentVariable("BING_API_KEY")))); | ||
|
||
var settings = new OpenAIPromptExecutionSettings() { ToolCallBehavior = ToolCallBehavior.AutoInvokeKernelFunctions };// Set the settings for the chat completion service. | ||
var chatService = kernel.GetRequiredService<IChatCompletionService>(); | ||
ChatHistory chatHistory = []; | ||
|
||
// Basic chat | ||
while (true) | ||
{ | ||
Console.Write("Q: "); | ||
chatHistory.AddUserMessage(Console.ReadLine());// Add user message to chat history, then it can be use to get more context for the next chat response | ||
|
||
var response = await chatService.GetChatMessageContentAsync(chatHistory, settings, kernel);// Get chat response based on chat history | ||
|
||
Console.WriteLine(response); | ||
chatHistory.Add(response);// Add chat response to chat history, hence it can be use to get more context for the next chat response | ||
} | ||
|
||
class PermissionFilter : IFunctionInvocationFilter | ||
{ | ||
public async Task OnFunctionInvocationAsync(FunctionInvocationContext context, Func<FunctionInvocationContext, Task> next) | ||
{ | ||
Console.WriteLine($"Allow {context.Function.Name}?"); | ||
if (Console.ReadLine() == "y") | ||
{ | ||
await next(context); | ||
} | ||
else | ||
{ | ||
throw new Exception("Permission denied"); | ||
} | ||
|
||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
src/build-2024/06 - Modifying Kernel Behavior with Dependency Injection/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Modifying Kernel Behavior with Dependency Injection | ||
|
||
A complete documentation for this project is [here](../docs/Exercise/06%20Modifying%20Kernel%20Behavior%20with%20Dependency%20Injection.md) |
15 changes: 15 additions & 0 deletions
15
...ild-2024/07 - Using Semantic Kernel in WebApp/07 - Using Semantic Kernel in WebApp.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<RootNamespace>_07___Using_Semantic_Kerenel_in_WebApp</RootNamespace> | ||
<NoWarn>CS0618</NoWarn> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" /> | ||
<PackageReference Include="Microsoft.SemanticKernel" Version="1.15.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |
6 changes: 6 additions & 0 deletions
6
...build-2024/07 - Using Semantic Kernel in WebApp/07 - Using Semantic Kernel in WebApp.http
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@_07___Using_Semantic_Kerenel_in_WebApp_HostAddress = http://localhost:5052 | ||
|
||
GET {{_07___Using_Semantic_Kerenel_in_WebApp_HostAddress}}/weatherforecast/ | ||
Accept: application/json | ||
|
||
### |
Oops, something went wrong.