Collection

Collection(**kwargs)

A Collection object for PGVector.
Attributes:
client: The PGVector client.
collection_name (str): The name of the collection. Default is “documents”.
embedding_function (Callable): The embedding function used to generate the vector representation.
Default is None. SentenceTransformer(“all-MiniLM-L6-v2”).encode will be used when None.
Models can be chosen from:
https://huggingface.co/models?library=sentence-transformers metadata (Optional[dict]): The metadata of the collection.
get_or_create (Optional): The flag indicating whether to get or create the collection.
Initialize the Collection object.

Parameters:
NameDescription
**kwargs

Class Attributes

add



convert_string_to_array



cosine_distance



count



create_collection



delete



delete_collection



euclidean_distance



get



inner_product_distance



modify



query



set_collection_name



table_exists



update



upsert