Function: createVectorStore()
ts
function createVectorStore<O>(
config: CreateVectorStoreConfig<O>,
): Promise<CallableVectorStore>;Defined in: batteries/vector/factory.ts:41
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.
Type Parameters
| Type Parameter | Default type |
|---|---|
O extends BaseVectorStoreOptions | BaseVectorStoreOptions |
Parameters
| Parameter | Type |
|---|---|
config | CreateVectorStoreConfig<O> |
Returns
Promise<CallableVectorStore>