.Net: Bug: Could not load file or assembly Microsoft.Extensions.VectorData.Abstractions Exception raised.
Describe the bug Bing_FunctionCallingWithTextSearch.FunctionCallingWithBingTextSearchIncludingCitationsAsync in a local environment, an exception occurs.
Could not load file or assembly 'Microsoft.Extensions.VectorData.Abstractions, Version=1.24.0.0, Culture=neutral, PublicKeyToken=f300afd708cefcd3'. 指定されたファイルが見つかりません。
場所 Microsoft.SemanticKernel.Plugins.Web.Bing.BingTextSearch.BuildQuery(String query, TextSearchOptions searchOptions)
場所 Microsoft.SemanticKernel.Plugins.Web.Bing.BingTextSearch.
To Reproduce Steps to reproduce the behavior:
internal class Program
{
static async Task Main(string[] args)
{
IKernelBuilder builder = Kernel.CreateBuilder()
.AddAzureOpenAIChatCompletion(
);
builder.Services.AddSingleton<IAutoFunctionInvocationFilter, AutoFunctionExceptionHandlingFilter>();
var kernel = builder.Build();
// Create a search service with Bing search
var textSearch = new BingTextSearch(new("key"));
// Build a text search plugin with Bing search and add to the kernel
var searchPlugin = textSearch.CreateWithGetTextSearchResults("SearchPlugin");
kernel.Plugins.Add(searchPlugin);
// Invoke prompt and use text search plugin to provide grounding information
OpenAIPromptExecutionSettings settings = new() { ToolCallBehavior = ToolCallBehavior.AutoInvokeKernelFunctions };
KernelArguments arguments = new(settings);
Console.WriteLine(await kernel.InvokePromptAsync("What is the Semantic Kernel? Include citations to the relevant information where it is referenced in the response.", arguments));
}
}
internal sealed class AutoFunctionExceptionHandlingFilter() : IAutoFunctionInvocationFilter
{
public async Task OnAutoFunctionInvocationAsync(AutoFunctionInvocationContext context, Func<AutoFunctionInvocationContext, Task> next)
{
try
{
await next(context);
}
catch (Exception exception)
{
Console.Write(exception.Message);
throw;
}
}
}
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Platform
- OS:Windows
- IDE: Visual Studio
- Language: C#
- Source: NuGet package version 1.24.0
Additional context Adding Microsoft.Extensions.VectorData.Abstractions -Version 9.0.0-preview.1.24515.1 still causes an exception.
Any updates on this, get the same issue now :(
@dflyingliu @aeras3637 We are working on it and will create another release soon.
@dflyingliu @aeras3637 please switch https://www.nuget.org/packages/Microsoft.SemanticKernel/1.24.1