Description
Describe the bug
Exception Method not found: 'Void Microsoft.Extensions.VectorData.ProviderServices.PropertyModel.SetValue(System.Object, !!0)'. when executing await foreach (TextSearchResult result in textResults.Results)
Message:
Method not found: 'Void Microsoft.Extensions.VectorData.ProviderServices.PropertyModel.SetValue(System.Object, !!0)'.
Source:
Microsoft.SemanticKernel.Connectors.SqlServer
Stak Trace:
at Microsoft.SemanticKernel.Connectors.SqlServer.SqlServerMapper1.<MapFromStorageToDataModel>g__PopulateValue|2_0(SqlDataReader reader, PropertyModel property, Object record) at Microsoft.SemanticKernel.Connectors.SqlServer.SqlServerMapper
1.MapFromStorageToDataModel(SqlDataReader reader, Boolean includeVectors)
at Microsoft.SemanticKernel.Connectors.SqlServer.SqlServerCollection2.<ReadVectorSearchResultsAsync>d__23.MoveNext() at Microsoft.SemanticKernel.Connectors.SqlServer.SqlServerCollection
2.d__23.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token)
at Microsoft.SemanticKernel.Connectors.SqlServer.SqlServerCollection2.<SearchAsync>d__21
1.MoveNext()
at Microsoft.SemanticKernel.Connectors.SqlServer.SqlServerCollection2.<SearchAsync>d__21
1.MoveNext()
at Microsoft.SemanticKernel.Connectors.SqlServer.SqlServerCollection2.<SearchAsync>d__21
1.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token)
at Microsoft.SemanticKernel.Data.VectorStoreTextSearch1.<ExecuteVectorSearchAsync>d__16.MoveNext() at Microsoft.SemanticKernel.Data.VectorStoreTextSearch
1.d__16.MoveNext()
at Microsoft.SemanticKernel.Data.VectorStoreTextSearch1.<ExecuteVectorSearchAsync>d__16.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token) at Microsoft.SemanticKernel.Data.VectorStoreTextSearch
1.d__18.MoveNext()
at Microsoft.SemanticKernel.Data.VectorStoreTextSearch1.<GetResultsAsTextSearchResultAsync>d__18.MoveNext() at Microsoft.SemanticKernel.Data.VectorStoreTextSearch
1.d__18.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token)
To Reproduce
Steps to reproduce the behavior:
- Builder kernel with IEmbeddingGenerator AsIEmbeddingGenerator()
- Add AddSqlServerCollection
- Build the collection
- Search the collection using new VectorStoreTextSearch(vectorStoreCollection);
- KernelSearchResults textResults = await textSearch.GetTextSearchResultsAsync(query, new() { Top = 5, Skip = 0 });
- Exception caught here:
try
{
await foreach (TextSearchResult result in textResults.Results)
{
memoryBuilder.AppendLine(result.Value);
}
}
catch (Exception ex)
{
throw;
}
Expected behavior
TextSearchResult returns search results for the created collection
Screenshots
If applicable, add screenshots to help explain your problem.
Platform
- Language: C#
- Source: Microsoft.Extensions.VectorData.Abstractions 9.5.0, Microsoft.SemanticKernel 1.56.0, Microsoft.SemanticKernel.Connectors.SqlServer 1.56.0-preview
- AI model: text-embedding-ada-002
- IDE: Visual Studio
- OS: Windows
Additional context
I have created a console app here (https://github.com/idlemind/RAGTest).
The solution uses AzureOpenAIEmbeddings text-embedding-ada-002
Metadata
Metadata
Assignees
Type
Projects
Status