Skip to content
1 min read · 214 words

@nhtio/adk/batteries/vector/factory

Interfaces

InterfaceDescription
CreateVectorStoreConfigConfiguration accepted by createVectorStore: the adapter client plus its options.
EmbeddingsLikeThe minimal shape of an embeddings-battery adapter usable as a vector encoder.
VectorStoreConstructorThe adapter class shape the factory accepts as client — a constructor with an optional availability probe.

Type Aliases

Type AliasDescription
VectorStoreClientclient is one of: - the adapter class itself — QdrantVectorStore - a sync resolver — () => QdrantVectorStore - an async resolver / dynamic import — () => import('…/qdrant').then(m => m.QdrantVectorStore) A resolver may also return a module namespace whose default is the class.

Functions

| Function | Description | | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | createVectorStore | Build a callable store. Validate config; resolve the client (class | sync resolver | async resolver) to a BaseVectorStore subclass ctor; optional availability gate; construct; return asCallable(). Async so that client: () => import('…') can lazily load the adapter (and its driver) only when the store is actually created. | | encoderFromEmbeddings | Adapt an EmbeddingsLike object into a VectorEncoderFn for use as a store encoder. |