Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net: Bug: unable to get required service of Azure Cosmos NoSql DB vector store using Microsoft.SemanticKernel.Connectors.AzureCosmosDBNoSQL #10279

Closed
Samorax opened this issue Jan 23, 2025 · 0 comments
Labels
bug Something isn't working .NET Issue or Pull requests regarding .NET code triage

Comments

@Samorax
Copy link

Samorax commented Jan 23, 2025

Describe the bug
AzureCosmosNoSqlDatabaseVector could not recovered after registration with services in DI Container. I registered the service on the IKernelBuilder and tried to retrieve the service from DI, but got error message: "The service is not registered".

To Reproduce
Steps to reproduce the behavior:

  1. dotnet add package Microsoft.SemanticKernel.Connectors.AzureCosmosDBNoSQL --prerelease
  2. Register the service in program.cs builder.Services.AddKernel().AddAzureCosmosDBNoSQLVectorStore(connectionString,databaseName).
  3. Consume the service in an api controller - using Kernel or IServiceProvider in Dependency Injection
  4. You will get the error: "There is no registration for AzureCosmosDBNoSQLVectorStore"

Expected behavior
The AzureCosmosNoSqlDatabaseVector should already be registered and provide an instance of the vector database as a result.

Screenshots

Image Image

Image

Platform

  • OS: Windows
  • IDE: Visual Studio
  • Language: C#

Additional context
Add any other context about the problem here.

@Samorax Samorax added the bug Something isn't working label Jan 23, 2025
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code triage labels Jan 23, 2025
@github-actions github-actions bot changed the title Bug: unable to get required service of Azure Cosmos NoSql DB vector store using Microsoft.SemanticKernel.Connectors.AzureCosmosDBNoSQL .Net: Bug: unable to get required service of Azure Cosmos NoSql DB vector store using Microsoft.SemanticKernel.Connectors.AzureCosmosDBNoSQL Jan 23, 2025
@Samorax Samorax closed this as completed Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working .NET Issue or Pull requests regarding .NET code triage
Projects
None yet
Development

No branches or pull requests

2 participants