autogen.agentchat.contrib.vectordb.pgvectordb.Collection
Collection
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[str, Any]]): The metadata of the collection.
get_or_create (Optional): The flag indicating whether to get or create the collection.
Initialize the Collection object.
Name | Description |
---|---|
**kwargs |
Instance Methods
add
Call self as a function.
Parameters:Name | Description |
---|---|
*args | |
**kwargs |
convert_string_to_array
Call self as a function.
Parameters:Name | Description |
---|---|
*args | |
**kwargs |
cosine_distance
Call self as a function.
Parameters:Name | Description |
---|---|
*args | |
**kwargs |
count
Call self as a function.
Parameters:Name | Description |
---|---|
*args | |
**kwargs |
create_collection
Call self as a function.
Parameters:Name | Description |
---|---|
*args | |
**kwargs |
delete
Call self as a function.
Parameters:Name | Description |
---|---|
*args | |
**kwargs |
delete_collection
Call self as a function.
Parameters:Name | Description |
---|---|
*args | |
**kwargs |
euclidean_distance
Call self as a function.
Parameters:Name | Description |
---|---|
*args | |
**kwargs |
get
Call self as a function.
Parameters:Name | Description |
---|---|
*args | |
**kwargs |
inner_product_distance
Call self as a function.
Parameters:Name | Description |
---|---|
*args | |
**kwargs |
modify
Call self as a function.
Parameters:Name | Description |
---|---|
*args | |
**kwargs |
query
Call self as a function.
Parameters:Name | Description |
---|---|
*args | |
**kwargs |
set_collection_name
Call self as a function.
Parameters:Name | Description |
---|---|
*args | |
**kwargs |
table_exists
Call self as a function.
Parameters:Name | Description |
---|---|
*args | |
**kwargs |
update
Call self as a function.
Parameters:Name | Description |
---|---|
*args | |
**kwargs |
upsert
Call self as a function.
Parameters:Name | Description |
---|---|
*args | |
**kwargs |