Validator
This module contains functionality related to the the validator
module for embedding.vector_stores.pgvector
.
Validator
PGVectorStoreValidator
Bases: BaseVectorStoreValidator
Validator for Postgres vector store configuration.
Validates the existence of a table (treated as a collection) in the Postgres vector store backend. This validator ensures we don't create duplicate tables in the database.
Source code in src/embedding/vector_stores/pgvector/validator.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|
__init__(configuration, client)
Initialize the PGVector validator with configuration and client.
Parameters: |
|
---|
Source code in src/embedding/vector_stores/pgvector/validator.py
22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
validate()
Validate the PGVector configuration settings.
Runs all validation checks to ensure the vector store can be properly initialized.
Raises: |
|
---|
Source code in src/embedding/vector_stores/pgvector/validator.py
36 37 38 39 40 41 42 43 44 |
|
validate_collection()
Validate that the PGVector collection (table) doesn't already exist.
Checks if a table with the same name exists in the PostgreSQL database to prevent duplicate collections.
Raises: |
|
---|
Source code in src/embedding/vector_stores/pgvector/validator.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|
PGVectorStoreValidatorFactory
Bases: SingletonFactory
Factory for creating configured PGVector store validators.
Creates and manages singleton instances of validators for PostgreSQL vector store backends.
Attributes: |
|
---|
Source code in src/embedding/vector_stores/pgvector/validator.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|