Vector_store_configuration

This module contains functionality related to the the vector_store_configuration module for embedding.bootstrap.configuration.

Vector_store_configuration

VectorStoreConfiguration

Bases: BaseConfigurationWithSecrets, ABC

Abstract base configuration class for vector stores.

Inherits from BaseConfigurationWithSecrets to handle secure configuration settings. All specific vector store configurations should inherit from this class.

Attributes:
  • port (int) –

    The port number for connecting to the vector store server.

  • collection_name (str) –

    Name of the collection in the vector store.

  • host (str) –

    Hostname or IP address of the vector store server.

  • protocol (Union[Literal['http'], Literal['https']]) –

    Connection protocol (http or https).

Source code in src/embedding/bootstrap/configuration/vector_store_configuration.py
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
class VectorStoreConfiguration(BaseConfigurationWithSecrets, ABC):
    """
    Abstract base configuration class for vector stores.

    Inherits from BaseConfigurationWithSecrets to handle secure configuration settings.
    All specific vector store configurations should inherit from this class.

    Attributes:
        port: The port number for connecting to the vector store server.
        collection_name: Name of the collection in the vector store.
        host: Hostname or IP address of the vector store server.
        protocol: Connection protocol (http or https).
    """

    port: int = Field(..., description="The port for the vector store.")
    collection_name: str = Field(
        ..., description="The collection name in the vector store."
    )
    host: str = Field(
        "127.0.0.1", description="Host of the vector store server"
    )
    protocol: Union[Literal["http"], Literal["https"]] = Field(
        "http", description="The protocol for the vector store."
    )

VectorStoreConfigurationRegistry

Bases: ConfigurationRegistry

Registry for vector store configurations.

Maps VectorStoreName enum values to their corresponding configuration classes. Used to retrieve the appropriate configuration based on the selected vector store.

Source code in src/embedding/bootstrap/configuration/vector_store_configuration.py
50
51
52
53
54
55
56
57
58
class VectorStoreConfigurationRegistry(ConfigurationRegistry):
    """
    Registry for vector store configurations.

    Maps VectorStoreName enum values to their corresponding configuration classes.
    Used to retrieve the appropriate configuration based on the selected vector store.
    """

    _key_class = VectorStoreName

VectorStoreName

Bases: str, Enum

Enumeration of supported vector store providers.

Source code in src/embedding/bootstrap/configuration/vector_store_configuration.py
12
13
14
15
16
17
18
19
class VectorStoreName(str, Enum):
    """
    Enumeration of supported vector store providers.
    """

    QDRANT = "qdrant"
    CHROMA = "chroma"
    PGVECTOR = "pgvector"