-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathBasicDiskMemoryVectorDatabaseBase.cs
More file actions
29 lines (27 loc) · 1.47 KB
/
BasicDiskMemoryVectorDatabaseBase.cs
File metadata and controls
29 lines (27 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using Build5Nines.SharpVector.Id;
using Build5Nines.SharpVector.Preprocessing;
using Build5Nines.SharpVector.Vocabulary;
using Build5Nines.SharpVector.Vectorization;
using Build5Nines.SharpVector.VectorCompare;
using Build5Nines.SharpVector.VectorStore;
namespace Build5Nines.SharpVector;
/// <summary>
/// Base class for an on-disk vector database. Mirrors MemoryVectorDatabaseBase generic composition
/// while using disk-backed stores for persistence.
/// </summary>
public abstract class BasicDiskMemoryVectorDatabaseBase<TId, TMetadata, TVectorStore, TVocabularyStore, TVocabularyKey, TVocabularyValue, TIdGenerator, TTextPreprocessor, TVectorizer, TVectorComparer>
: VectorDatabaseBase<TId, TMetadata, TVectorStore, TVocabularyStore, TVocabularyKey, TVocabularyValue, TIdGenerator, TTextPreprocessor, TVectorizer, TVectorComparer>
where TId : notnull
where TVocabularyKey : notnull
where TVocabularyValue : notnull
where TVectorStore : IVectorStoreWithVocabulary<TId, TMetadata, TVocabularyStore, TVocabularyKey, TVocabularyValue>
where TVocabularyStore : IVocabularyStore<TVocabularyKey, TVocabularyValue>
where TIdGenerator : IIdGenerator<TId>, new()
where TTextPreprocessor : ITextPreprocessor<TVocabularyKey>, new()
where TVectorizer : IVectorizer<TVocabularyKey, TVocabularyValue>, new()
where TVectorComparer : IVectorComparer, new()
{
protected BasicDiskMemoryVectorDatabaseBase(TVectorStore vectorStore)
: base(vectorStore)
{ }
}