langchain_community.vectorstores.pgembedding
.CollectionStore¶
- class langchain_community.vectorstores.pgembedding.CollectionStore(**kwargs)[source]¶
集合存储。
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
Attributes
cmetadata
embeddings
metadata
name
registry
uuid
Methods
__init__
(**kwargs)A simple constructor that allows initialization from kwargs.
get_by_name
(session, name)get_or_create
(session, name[, cmetadata])获取或创建一个集合。 返回[Collection, bool],其中bool为True,如果集合被创建。
- __init__(**kwargs)¶
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
- classmethod get_by_name(session: Session, name: str) Optional[CollectionStore] [source]¶
- Parameters
session (Session) –
name (str) –
- Return type
Optional[CollectionStore]
- classmethod get_or_create(session: Session, name: str, cmetadata: Optional[dict] = None) Tuple[CollectionStore, bool] [source]¶
获取或创建一个集合。 返回[Collection, bool],其中bool为True,如果集合被创建。
- Parameters
session (Session) –
name (str) –
cmetadata (Optional[dict]) –
- Return type
Tuple[CollectionStore, bool]