open static method
Opens the database and loads the embedding model + vocab.
Implementation
static Future<EmbeddedKalanDB> open({
required String dbPath,
required String modelPath,
required String vocabPath,
KalanDBConfig? config,
int dimension = 384,
Pooling pooling = Pooling.cls,
String queryInstruction = TextEmbedder.bgeQueryInstruction,
int maxSeqLen = 256,
}) async {
final db = await KalanDB.open(dbPath, config: config);
final embedder = await TextEmbedder.create(
modelPath: modelPath,
vocabPath: vocabPath,
dimension: dimension,
pooling: pooling,
queryInstruction: queryInstruction,
maxSeqLen: maxSeqLen,
);
return EmbeddedKalanDB._(db, embedder);
}