API documentation for vector_store
module.
Classes
BigtableVectorStore
BigtableVectorStore(instance_id: str, table_id: str, embedding_service: langchain_core.embeddings.embeddings.Embeddings, collection: str, content_column: langchain_google_bigtable.async_vector_store.ColumnConfig = ColumnConfig(column_qualifier='content', column_family='langchain', encoding=<Encoding.UTF8: 'utf-8'>), embedding_column: langchain_google_bigtable.async_vector_store.ColumnConfig = ColumnConfig(column_qualifier='embedding', column_family='langchain', encoding=<Encoding.UTF8: 'utf-8'>), project_id: typing.Optional[str] = None, metadata_mappings: typing.Optional[typing.List[langchain_google_bigtable.async_vector_store.VectorMetadataMapping]] = None, metadata_as_json_column: typing.Optional[langchain_google_bigtable.async_vector_store.ColumnConfig] = None, engine: typing.Optional[langchain_google_bigtable.engine.BigtableEngine] = None, app_profile_id: typing.Optional[str] = None, **kwargs: typing.Any)
A vector store implementation using Google Cloud Bigtable.
This class provides the main user-facing interface, conforming to the
langchain_core.vectorstores.VectorStore
standard, and handles both
synchronous and asynchronous operations by wrapping an async core.
Modules Functions
init_vector_store_table
init_vector_store_table(
instance_id: str,
table_id: str,
project_id: typing.Optional[str] = None,
client: typing.Optional[google.cloud.bigtable.client.Client] = None,
content_column_family: str = "langchain",
embedding_column_family: str = "langchain",
) -> None
Creates a Bigtable table with the necessary column families for the vector store.
It always creates the "md" column family for metadata and allows you to specify the name of the column family used for content and embeddings.
Parameters | |
---|---|
Name | Description |
instance_id |
str
The ID of the Bigtable instance. |
table_id |
str
The ID of the table to create. |
project_id |
Optional[str]
Your Google Cloud project ID. |
client |
Optional[bigtable.Client]
An optional pre-configured Bigtable admin client. |
content_column_family |
str
The name of the column family to store document content. Defaults to "langchain". |
embedding_column_family |
str
The name of the column family to store embeddings. Defaults to "langchain". |
Exceptions | |
---|---|
Type | Description |
ValueError |
If the table already exists. |
PermissionDenied |
If the client lacks permission to create the table. |
GoogleAPIError |
If any other Google Cloud API error occurs. |