chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
using VectorData.ConformanceTests.Support;
|
||||
|
||||
namespace InMemory.ConformanceTests.Support;
|
||||
|
||||
public class InMemoryFixture : VectorStoreFixture
|
||||
{
|
||||
public override TestStore TestStore => InMemoryTestStore.Instance;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
using Microsoft.SemanticKernel.Connectors.InMemory;
|
||||
using VectorData.ConformanceTests.Support;
|
||||
|
||||
namespace InMemory.ConformanceTests.Support;
|
||||
|
||||
internal sealed class InMemoryTestStore : TestStore
|
||||
{
|
||||
public static InMemoryTestStore Instance { get; } = new();
|
||||
|
||||
public InMemoryVectorStore GetVectorStore(InMemoryVectorStoreOptions options)
|
||||
=> new(new() { EmbeddingGenerator = options.EmbeddingGenerator });
|
||||
|
||||
private InMemoryTestStore()
|
||||
{
|
||||
}
|
||||
|
||||
protected override Task StartAsync()
|
||||
{
|
||||
this.DefaultVectorStore = new InMemoryVectorStore();
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user