semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

ChromaMemoryStore SearchAsync BadRequest 400

Open PaulTodd opened this issue 1 year ago • 0 comments

I'm probably doing something wrong, but I have a local chroma db running in Docker on localhost:8000 and I can query the collections perfectly fine, but when I try to search the db it throws a BadRequest 400 error:

` Kernel kernel = Kernel.CreateBuilder() .AddOllamaChatCompletion( endpoint: new Uri("http://localhost:11434"), modelId: "llama3.1:8b" ) .AddOllamaTextEmbeddingGeneration( endpoint: new Uri("http://localhost:11434"), modelId: "llama3.1:8b" ) .Build(); var embeddingGenerator = kernel.GetRequiredService<ITextEmbeddingGenerationService>();

ISemanticTextMemory memory = new MemoryBuilder() .WithTextEmbeddingGeneration(embeddingGenerator) .WithChromaMemoryStore("http://localhost:8000") .Build();

//Works Fine IList collections = await memory.GetCollectionsAsync();

// An unhandled exception of type 'Microsoft.SemanticKernel.HttpOperationException' occurred in System.Private.CoreLib.dll Response status code does not indicate success: 400 (Bad Request). await foreach (var result in memory.SearchAsync(collections.First(), "User Question String", limit: 3, minRelevanceScore: 0.3, withEmbeddings: true)) { Console.WriteLine(result.Metadata.Text); }`

PaulTodd avatar Sep 26 '24 01:09 PaulTodd