Skip to content

Commit 1f53d41

Browse files
Merge branch 'main' into users/markwallace/a2a_agent
2 parents 9784e59 + a984b41 commit 1f53d41

File tree

430 files changed

+26638
-4718
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

430 files changed

+26638
-4718
lines changed

docs/decisions/0072-context-based-function-selection.md

Lines changed: 403 additions & 0 deletions
Large diffs are not rendered by default.

dotnet/Directory.Packages.props

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77
<ItemGroup>
88
<PackageVersion Include="Aspire.Azure.AI.OpenAI" Version="9.1.0-preview.1.25121.10" />
99
<PackageVersion Include="Aspire.Azure.Search.Documents" Version="9.2.1" />
10-
<PackageVersion Include="Aspire.Hosting.Azure.Search" Version="9.1.0" />
1110
<PackageVersion Include="Aspire.Hosting.AppHost" Version="9.2.0" />
1211
<PackageVersion Include="Aspire.Hosting.Azure.CognitiveServices" Version="9.1.0" />
12+
<PackageVersion Include="Aspire.Hosting.Azure.Search" Version="9.1.0" />
1313
<PackageVersion Include="AWSSDK.BedrockAgent" Version="4.0.0-preview.13" />
1414
<PackageVersion Include="AWSSDK.BedrockAgentRuntime" Version="4.0.0-preview.13" />
15-
<PackageVersion Include="AWSSDK.BedrockRuntime" Version="4.0.0-preview.13" />
16-
<PackageVersion Include="AWSSDK.Core" Version="4.0.0-preview.13" />
17-
<PackageVersion Include="AWSSDK.Extensions.NETCore.Setup" Version="4.0.0-preview.10" />
15+
<PackageVersion Include="AWSSDK.BedrockRuntime" Version="4.0.0.2" />
16+
<PackageVersion Include="AWSSDK.Core" Version="4.0.0.3" />
17+
<PackageVersion Include="AWSSDK.Extensions.Bedrock.MEAI" Version="4.0.0-preview.16" />
18+
<PackageVersion Include="AWSSDK.Extensions.NETCore.Setup" Version="4.0.0" />
19+
<PackageVersion Include="AWSSDK.SecurityToken" Version="4.0.0.2" />
1820
<PackageVersion Include="Azure.AI.ContentSafety" Version="1.0.0" />
1921
<PackageVersion Include="Azure.AI.Inference" Version="1.0.0-beta.2" />
2022
<PackageVersion Include="Azure.AI.OpenAI" Version="[2.2.0-beta.4]" />
@@ -29,24 +31,24 @@
2931
<PackageVersion Include="EntityFramework" Version="6.5.1" />
3032
<PackageVersion Include="FastBertTokenizer" Version="1.0.28" />
3133
<PackageVersion Include="Google.Apis.Auth" Version="1.69.0" />
34+
<PackageVersion Include="Google.Apis.CustomSearchAPI.v1" Version="1.68.0.3520" />
3235
<PackageVersion Include="Google.Protobuf" Version="3.27.1" />
3336
<PackageVersion Include="Grpc.AspNetCore" Version="2.70.0" />
3437
<PackageVersion Include="Grpc.AspNetCore.Server" Version="2.70.0" />
3538
<PackageVersion Include="Grpc.AspNetCore.Server.Reflection" Version="2.70.0" />
3639
<PackageVersion Include="Grpc.AspNetCore.Web" Version="2.70.0" />
40+
<PackageVersion Include="Grpc.Net.Client" Version="2.70.0" />
3741
<PackageVersion Include="Grpc.Tools" Version="2.71.0" />
38-
<PackageVersion Include="ModelContextProtocol" Version="0.1.0-preview.13" />
39-
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.13" />
40-
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="8.0.14" />
41-
<PackageVersion Include="Microsoft.ML.Tokenizers.Data.Cl100kBase" Version="1.0.1" />
42-
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="7.5.1" />
43-
<PackageVersion Include="Microsoft.VisualStudio.Threading" Version="17.12.19" />
42+
<PackageVersion Include="JmesPath.Net" Version="1.0.330" />
43+
<PackageVersion Include="JsonSchema.Net.Generation" Version="5.0.2" />
4444
<PackageVersion Include="Handlebars.Net.Helpers" Version="2.4.10" />
4545
<PackageVersion Include="Handlebars.Net" Version="2.1.6" />
4646
<PackageVersion Include="HtmlAgilityPack" Version="1.11.72" />
47-
<PackageVersion Include="JsonSchema.Net" Version="5.4.2" />
47+
<PackageVersion Include="JsonSchema.Net" Version="7.3.4" />
4848
<PackageVersion Include="Markdig" Version="0.40.0" />
4949
<PackageVersion Include="Microsoft.AspNet.WebApi.Client" Version="6.0.0" />
50+
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.13" />
51+
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="8.0.14" />
5052
<PackageVersion Include="Microsoft.Azure.Functions.Worker" Version="2.0.0" />
5153
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.3.0" />
5254
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="2.0.0" />
@@ -62,7 +64,11 @@
6264
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.13.0" />
6365
<PackageVersion Include="Microsoft.Bcl.TimeProvider" Version="8.0.1" />
6466
<PackageVersion Include="Microsoft.Identity.Client" Version="4.67.2" />
67+
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="7.5.1" />
6568
<PackageVersion Include="Microsoft.ML.OnnxRuntime" Version="1.21.0" />
69+
<PackageVersion Include="Microsoft.ML.Tokenizers.Data.Cl100kBase" Version="1.0.1" />
70+
<PackageVersion Include="Microsoft.VisualStudio.Threading" Version="17.12.19" />
71+
<PackageVersion Include="ModelContextProtocol" Version="0.1.0-preview.14" />
6672
<PackageVersion Include="MSTest.TestFramework" Version="3.8.0" />
6773
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
6874
<PackageVersion Include="Npgsql" Version="8.0.6" />
@@ -97,10 +103,10 @@
97103
<PackageVersion Include="Microsoft.DeepDev.TokenizerLib" Version="1.3.3" />
98104
<PackageVersion Include="SharpToken" Version="2.0.3" />
99105
<!-- Microsoft.Extensions.* -->
100-
<PackageVersion Include="Microsoft.Extensions.AI" Version="9.4.4-preview.1.25259.16" />
101-
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="9.4.4-preview.1.25259.16" />
102-
<PackageVersion Include="Microsoft.Extensions.AI.AzureAIInference" Version="9.4.4-preview.1.25259.16" />
103-
<PackageVersion Include="Microsoft.Extensions.AI.OpenAI" Version="9.4.4-preview.1.25259.16" />
106+
<PackageVersion Include="Microsoft.Extensions.AI" Version="9.5.0" />
107+
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="9.5.0" />
108+
<PackageVersion Include="Microsoft.Extensions.AI.AzureAIInference" Version="9.5.0-preview.1.25265.7" />
109+
<PackageVersion Include="Microsoft.Extensions.AI.OpenAI" Version="9.5.0-preview.1.25265.7" />
104110
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
105111
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
106112
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
@@ -148,8 +154,6 @@
148154
<PackageVersion Include="Microsoft.OpenApi.Readers" Version="1.6.23" />
149155
<PackageVersion Include="Microsoft.OpenApi.ApiManifest" Version="0.5.6-preview" />
150156
<PackageVersion Include="Microsoft.Plugins.Manifest" Version="1.0.0-rc3" />
151-
<PackageVersion Include="Google.Apis.CustomSearchAPI.v1" Version="1.68.0.3520" />
152-
<PackageVersion Include="Grpc.Net.Client" Version="2.70.0" />
153157
<PackageVersion Include="protobuf-net" Version="3.2.45" />
154158
<PackageVersion Include="protobuf-net.Reflection" Version="3.2.12" />
155159
<PackageVersion Include="YamlDotNet" Version="15.3.0" />

dotnet/SK-dotnet.sln

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "A2AClient", "samples\Demos\
558558
EndProject
559559
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "A2AServer", "samples\Demos\A2AClientServer\A2AServer\A2AServer.csproj", "{D5324629-DFED-4095-EA74-A0234AC9EB4E}"
560560
EndProject
561+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Agents.Orchestration", "src\Agents\Orchestration\Agents.Orchestration.csproj", "{D1A02387-FA60-22F8-C2ED-4676568B6CC3}"
562+
EndProject
561563
Global
562564
GlobalSection(SolutionConfigurationPlatforms) = preSolution
563565
Debug|Any CPU = Debug|Any CPU
@@ -1537,6 +1539,12 @@ Global
15371539
{D5324629-DFED-4095-EA74-A0234AC9EB4E}.Publish|Any CPU.Build.0 = Release|Any CPU
15381540
{D5324629-DFED-4095-EA74-A0234AC9EB4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
15391541
{D5324629-DFED-4095-EA74-A0234AC9EB4E}.Release|Any CPU.Build.0 = Release|Any CPU
1542+
{D1A02387-FA60-22F8-C2ED-4676568B6CC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1543+
{D1A02387-FA60-22F8-C2ED-4676568B6CC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
1544+
{D1A02387-FA60-22F8-C2ED-4676568B6CC3}.Publish|Any CPU.ActiveCfg = Publish|Any CPU
1545+
{D1A02387-FA60-22F8-C2ED-4676568B6CC3}.Publish|Any CPU.Build.0 = Publish|Any CPU
1546+
{D1A02387-FA60-22F8-C2ED-4676568B6CC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
1547+
{D1A02387-FA60-22F8-C2ED-4676568B6CC3}.Release|Any CPU.Build.0 = Release|Any CPU
15401548
EndGlobalSection
15411549
GlobalSection(SolutionProperties) = preSolution
15421550
HideSolutionNode = FALSE
@@ -1562,7 +1570,7 @@ Global
15621570
{AFA81EB7-F869-467D-8A90-744305D80AAC} = {1B4CBDE0-10C2-4E7D-9CD0-FE7586C96ED1}
15631571
{627742DB-1E52-468A-99BD-6FF1A542D25B} = {831DDCA2-7D2C-4C31-80DB-6BDB3E1F7AE0}
15641572
{E3299033-EB81-4C4C-BCD9-E8DC40937969} = {831DDCA2-7D2C-4C31-80DB-6BDB3E1F7AE0}
1565-
{078F96B4-09E1-4E0E-B214-F71A4F4BF633} = {831DDCA2-7D2C-4C31-80DB-6BDB3E1F7AE0}
1573+
{078F96B4-09E1-4E0E-B214-F71A4F4BF633} = {9ECD1AA0-75B3-4E25-B0B5-9F0945B64974}
15661574
{F51017A9-15C8-472D-893C-080046D710A6} = {078F96B4-09E1-4E0E-B214-F71A4F4BF633}
15671575
{EC3BB6D1-2FB2-4702-84C6-F791DE533ED4} = {24503383-A8C4-4255-9998-28D70FE8E99A}
15681576
{4D226C2F-AE9F-4EFB-AF2D-45C8FE5CB34E} = {24503383-A8C4-4255-9998-28D70FE8E99A}
@@ -1746,6 +1754,7 @@ Global
17461754
{5B1ECD1B-3C38-4458-A227-89846AF13760} = {5D4C0700-BBB5-418F-A7B2-F392B9A18263}
17471755
{F293D014-97E2-18CB-FA0F-0A0FBE149286} = {5B1ECD1B-3C38-4458-A227-89846AF13760}
17481756
{D5324629-DFED-4095-EA74-A0234AC9EB4E} = {5B1ECD1B-3C38-4458-A227-89846AF13760}
1757+
{D1A02387-FA60-22F8-C2ED-4676568B6CC3} = {6823CD5E-2ABE-41EB-B865-F86EC13F0CF9}
17491758
EndGlobalSection
17501759
GlobalSection(ExtensibilityGlobals) = postSolution
17511760
SolutionGuid = {FBDC56A3-86AD-4323-AA0F-201E59123B83}

dotnet/docs/EXPERIMENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ You can use the following diagnostic IDs to ignore warnings or errors for a part
8383
| SKEXP0070 | Amazon AI connector | | | | | |
8484
| | | | | | | |
8585
| SKEXP0080 | Process Framework |
86+
| SKEXP0081 | Process Framework - Foundry Process
8687
| | | | | | | |
8788
| SKEXP0101 | Experiment with Assistants |
8889
| SKEXP0101 | Experiment with Flow Orchestration |

dotnet/format.ps1

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ pushd $repoRoot
1414
$targets =
1515
git diff --name-only main..HEAD |
1616
ForEach-Object {
17-
Write-Host "$_ was changed"
18-
1917
$dir = Split-Path (Join-Path $repoRoot $_) -Parent # << absolute
2018
while ($dir -and $dir -ne $repoRoot) {
2119
$proj = Get-ChildItem -LiteralPath $dir -Filter *.csproj -File -ErrorAction Ignore |
2220
Select-Object -First 1
21+
2322
if ($proj) {
2423
if ($exclude -notcontains $proj.Name) { $proj.FullName }
2524
break
@@ -29,27 +28,18 @@ $targets =
2928
} |
3029
Sort-Object -Unique
3130

31+
popd
32+
3233
if (-not $targets) {
3334
# $targets = Get-ChildItem $repoRoot -Recurse -Filter *.sln |
3435
# Select-Object -Expand FullName
3536
Write-Host "No code changes found"
3637
}
3738

38-
if ($PSVersionTable.PSVersion.Major -ge 7) {
39-
$targets | ForEach-Object -Parallel {
40-
param($t) ; Write-Host " $t" ; dotnet format --verbosity normal $t
41-
}
42-
} else {
43-
$jobs = foreach ($t in $targets) {
44-
Start-Job -ScriptBlock {
45-
param($target)
46-
Write-Host " $target"
47-
dotnet format --verbosity normal $target
48-
} -ArgumentList $t
49-
}
50-
51-
# wait for all to finish and surface errors
52-
$jobs | Receive-Job -Wait -AutoRemoveJob
39+
foreach ($t in $targets) {
40+
Write-Host "Formatting $t"
5341
}
5442

55-
popd
43+
foreach ($t in $targets) {
44+
dotnet format --no-restore --verbosity diag $t
45+
}

dotnet/nuget.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
3-
3+
44
<packageSources>
55
<clear />
66
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
@@ -11,5 +11,5 @@
1111
<package pattern="*" />
1212
</packageSource>
1313
</packageSourceMapping>
14-
14+
1515
</configuration>

dotnet/nuget/nuget-package.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project>
22
<PropertyGroup>
33
<!-- Central version prefix - applies to all nuget packages. -->
4-
<VersionPrefix>1.49.0</VersionPrefix>
4+
<VersionPrefix>1.51.0</VersionPrefix>
55
<PackageVersion Condition="'$(VersionSuffix)' != ''">$(VersionPrefix)-$(VersionSuffix)</PackageVersion>
66
<PackageVersion Condition="'$(VersionSuffix)' == ''">$(VersionPrefix)</PackageVersion>
77

88
<Configurations>Debug;Release;Publish</Configurations>
99
<IsPackable>true</IsPackable>
1010

1111
<!-- Package validation. Baseline Version should be the latest version available on NuGet. -->
12-
<PackageValidationBaselineVersion>1.48.0</PackageValidationBaselineVersion>
12+
<PackageValidationBaselineVersion>1.50.0</PackageValidationBaselineVersion>
1313
<!-- Validate assembly attributes only for Publish builds -->
1414
<NoWarn Condition="'$(Configuration)' != 'Publish'">$(NoWarn);CP0003</NoWarn>
1515
<!-- Do not validate reference assemblies -->

dotnet/samples/Concepts/Caching/SemanticCachingWithFilters.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
using System.Diagnostics;
44
using Azure.Identity;
5+
using Microsoft.Extensions.AI;
56
using Microsoft.Extensions.DependencyInjection;
67
using Microsoft.Extensions.VectorData;
78
using Microsoft.SemanticKernel;
8-
using Microsoft.SemanticKernel.Embeddings;
99

1010
namespace Caching;
1111

@@ -124,8 +124,8 @@ private Kernel GetKernelWithCache(Action<IServiceCollection> configureVectorStor
124124
TestConfiguration.AzureOpenAI.Endpoint,
125125
TestConfiguration.AzureOpenAI.ApiKey);
126126

127-
// Add Azure OpenAI text embedding generation service
128-
builder.AddAzureOpenAITextEmbeddingGeneration(
127+
// Add Azure OpenAI embedding generator
128+
builder.AddAzureOpenAIEmbeddingGenerator(
129129
TestConfiguration.AzureOpenAIEmbeddings.DeploymentName,
130130
TestConfiguration.AzureOpenAIEmbeddings.Endpoint,
131131
TestConfiguration.AzureOpenAI.ApiKey);
@@ -138,8 +138,8 @@ private Kernel GetKernelWithCache(Action<IServiceCollection> configureVectorStor
138138
TestConfiguration.AzureOpenAI.Endpoint,
139139
new AzureCliCredential());
140140

141-
// Add Azure OpenAI text embedding generation service
142-
builder.AddAzureOpenAITextEmbeddingGeneration(
141+
// Add Azure OpenAI embedding generator
142+
builder.AddAzureOpenAIEmbeddingGenerator(
143143
TestConfiguration.AzureOpenAIEmbeddings.DeploymentName,
144144
TestConfiguration.AzureOpenAIEmbeddings.Endpoint,
145145
new AzureCliCredential());
@@ -181,7 +181,7 @@ public class CacheBaseFilter
181181
/// Filter which is executed during prompt rendering operation.
182182
/// </summary>
183183
public sealed class PromptCacheFilter(
184-
ITextEmbeddingGenerationService textEmbeddingGenerationService,
184+
IEmbeddingGenerator<string, Embedding<float>> embeddingGenerator,
185185
IVectorStore vectorStore)
186186
: CacheBaseFilter, IPromptRenderFilter
187187
{
@@ -193,7 +193,7 @@ public async Task OnPromptRenderAsync(PromptRenderContext context, Func<PromptRe
193193
// Get rendered prompt
194194
var prompt = context.RenderedPrompt!;
195195

196-
var promptEmbedding = await textEmbeddingGenerationService.GenerateEmbeddingAsync(prompt);
196+
var promptEmbedding = await embeddingGenerator.GenerateAsync(prompt);
197197

198198
var collection = vectorStore.GetCollection<string, CacheRecord>(CollectionName);
199199
await collection.CreateCollectionIfNotExistsAsync();
@@ -218,11 +218,11 @@ public async Task OnPromptRenderAsync(PromptRenderContext context, Func<PromptRe
218218
/// Filter which is executed during function invocation.
219219
/// </summary>
220220
public sealed class FunctionCacheFilter(
221-
ITextEmbeddingGenerationService textEmbeddingGenerationService,
221+
IEmbeddingGenerator<string, Embedding<float>> embeddingGenerator,
222222
IVectorStore vectorStore)
223223
: CacheBaseFilter, IFunctionInvocationFilter
224224
{
225-
public async Task OnFunctionInvocationAsync(FunctionInvocationContext context, Func<FunctionInvocationContext, Task> next)
225+
public async Task OnFunctionInvocationAsync(Microsoft.SemanticKernel.FunctionInvocationContext context, Func<Microsoft.SemanticKernel.FunctionInvocationContext, Task> next)
226226
{
227227
// Trigger function invocation
228228
await next(context);
@@ -237,7 +237,7 @@ public async Task OnFunctionInvocationAsync(FunctionInvocationContext context, F
237237
var recordId = context.Result.Metadata?.GetValueOrDefault(RecordIdKey, Guid.NewGuid().ToString()) as string;
238238

239239
// Generate prompt embedding.
240-
var promptEmbedding = await textEmbeddingGenerationService.GenerateEmbeddingAsync(context.Result.RenderedPrompt);
240+
var promptEmbedding = await embeddingGenerator.GenerateAsync(context.Result.RenderedPrompt);
241241

242242
// Cache rendered prompt and LLM result.
243243
var collection = vectorStore.GetCollection<string, CacheRecord>(CollectionName);
@@ -248,7 +248,7 @@ public async Task OnFunctionInvocationAsync(FunctionInvocationContext context, F
248248
Id = recordId!,
249249
Prompt = context.Result.RenderedPrompt,
250250
Result = result.ToString(),
251-
PromptEmbedding = promptEmbedding
251+
PromptEmbedding = promptEmbedding.Vector
252252
};
253253

254254
await collection.UpsertAsync(cacheRecord, cancellationToken: context.CancellationToken);

dotnet/samples/Concepts/ChatCompletion/OpenAI_FunctionCallingWithMemoryPlugin.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
using System.ComponentModel;
44
using System.Text.Json;
5+
using Microsoft.Extensions.AI;
56
using Microsoft.Extensions.DependencyInjection;
67
using Microsoft.SemanticKernel;
78
using Microsoft.SemanticKernel.Connectors.OpenAI;
8-
using Microsoft.SemanticKernel.Embeddings;
99
using Microsoft.SemanticKernel.Memory;
1010
using Microsoft.SemanticKernel.Plugins.Memory;
1111

@@ -35,17 +35,17 @@ public async Task UseFunctionCallingToRetrieveMemoriesAsync()
3535
kernelBuilder.AddOpenAIChatCompletion(
3636
modelId: TestConfiguration.OpenAI.ChatModelId!,
3737
apiKey: TestConfiguration.OpenAI.ApiKey!);
38-
kernelBuilder.AddOpenAITextEmbeddingGeneration(
38+
kernelBuilder.AddOpenAIEmbeddingGenerator(
3939
modelId: TestConfiguration.OpenAI.EmbeddingModelId!,
4040
apiKey: TestConfiguration.OpenAI.ApiKey!);
4141
kernelBuilder.Services.AddSingleton<ITestOutputHelper>(this.Output);
4242
kernelBuilder.Services.AddSingleton<IFunctionInvocationFilter, FunctionInvocationFilter>();
4343
Kernel kernel = kernelBuilder.Build();
4444

4545
// Create a text memory store and populate it with sample data
46-
var embeddingGeneration = kernel.GetRequiredService<ITextEmbeddingGenerationService>();
46+
var embeddingGenerator = kernel.GetRequiredService<IEmbeddingGenerator<string, Embedding<float>>>();
4747
VolatileMemoryStore memoryStore = new();
48-
SemanticTextMemory textMemory = new(memoryStore, embeddingGeneration);
48+
SemanticTextMemory textMemory = new(memoryStore, embeddingGenerator);
4949
string collectionName = "SemanticKernel";
5050
await PopulateMemoryAsync(collectionName, textMemory);
5151

@@ -114,7 +114,7 @@ private sealed class FunctionInvocationFilter(ITestOutputHelper output) : IFunct
114114
private readonly ITestOutputHelper _output = output;
115115

116116
/// <inheritdoc />
117-
public async Task OnFunctionInvocationAsync(FunctionInvocationContext context, Func<FunctionInvocationContext, Task> next)
117+
public async Task OnFunctionInvocationAsync(Microsoft.SemanticKernel.FunctionInvocationContext context, Func<Microsoft.SemanticKernel.FunctionInvocationContext, Task> next)
118118
{
119119
this._output.WriteLine($"Function Invocation - {context.Function.Name}");
120120
await next(context);

dotnet/samples/Concepts/Concepts.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
<PackageReference Include="Microsoft.OpenApi" />
4646
<PackageReference Include="System.Linq.Async" />
4747
<PackageReference Include="System.Numerics.Tensors" />
48+
<PackageReference Include="AWSSDK.Core" />
49+
<PackageReference Include="AWSSDK.SecurityToken" />
4850
</ItemGroup>
4951

5052
<PropertyGroup>
@@ -53,6 +55,7 @@
5355
<Import Project="$(RepoRoot)/dotnet/src/InternalUtilities/samples/SamplesInternalUtilities.props" />
5456

5557
<ItemGroup>
58+
<ProjectReference Include="..\..\src\Connectors\Connectors.Amazon\Connectors.Amazon.csproj" />
5659
<ProjectReference Include="..\..\src\Connectors\Connectors.AzureAIInference\Connectors.AzureAIInference.csproj" />
5760
<ProjectReference Include="..\..\src\Connectors\Connectors.AzureOpenAI\Connectors.AzureOpenAI.csproj" />
5861
<ProjectReference Include="..\..\src\Connectors\Connectors.MistralAI\Connectors.MistralAI.csproj" />

0 commit comments

Comments
 (0)