Class VectorStoreManager

Implements the IVectorStoreManager interface.

VectorStoreManager

Implements

Implements

Constructors

Methods

  • Initializes the VectorStoreManager with configurations for all its managed providers and data sources. This involves instantiating and initializing each configured IVectorStore provider.

    Parameters

    • managerConfig: VectorStoreManagerConfig

      The manager's configuration, including an array of individual vector store provider configurations.

    • dataSourceConfigs: RagDataSourceConfig[]

      An array of configurations for all logical data sources, which map to specific providers and collections/indexes within them.

    Returns Promise<void>

    A promise that resolves when the manager and all its essential providers are successfully initialized.

    Async

    Throws

    If initialization fails due to invalid configuration, inability to connect to a critical provider, or other setup errors.

  • Retrieves a specific, initialized IVectorStore provider instance by its configured ID. The provider ID corresponds to VectorStoreProviderConfig.id.

    Parameters

    • providerId: string

      The unique ID of the vector store provider instance.

    Returns IVectorStore

    The IVectorStore instance.

    Throws

    If the providerId is not configured, not found, or the provider failed to initialize.

  • Retrieves an IVectorStore instance and the specific collection name within that store associated with a given logical RAG Data Source ID. This is a convenience method for services like RetrievalAugmentor that operate on logical dataSourceIds.

    Parameters

    • dataSourceId: string

      The logical RAG Data Source ID (from RagDataSourceConfig.dataSourceId).

    Returns Promise<{
        store: IVectorStore;
        collectionName: string;
        dimension?: number;
    }>

    A promise that resolves with the IVectorStore instance, the actual collection name to use with that store for this data source, and the expected embedding dimension.

    Throws

    If the dataSourceId is not configured, or its associated provider is unavailable.

  • Gracefully shuts down all managed vector store providers. This calls the shutdown() method on each initialized IVectorStore instance.

    Returns Promise<void>

    A promise that resolves when all providers have been shut down.

    Async

Properties

managerInstanceId: string