Create a CassandraGraphVectorStore from a document list.
from_documents(
cls: Type[CGVST],
documents: List[Document],
embedding: Embeddings,
*,
session: Optional[Session] = None,
keyspace: Optional[str] = None,
table_name: str = '',
ids: Optional[List[str]] = None,
ttl_seconds: Optional[int] = None,
body_index_options: Optional[List[Tuple[str, Any]]] = None,
metadata_deny_list: Optional[list[str]] = None,
**kwargs: Any = {}
) -> CGVST| Name | Type | Description |
|---|---|---|
documents* | List[Document] | Documents to add to the vectorstore. |
embedding* | Embeddings | Embedding function to use. |
session | Optional[Session] | Default: NoneCassandra driver session. If not provided, it is resolved from cassio. |
keyspace | Optional[str] | Default: NoneCassandra key space. If not provided, it is resolved from cassio. |
table_name | str | Default: ''Cassandra table (required). |
ids | Optional[List[str]] | Default: NoneOptional list of IDs associated with the documents. |
ttl_seconds | Optional[int] | Default: NoneOptional time-to-live for the added documents. |
body_index_options | Optional[List[Tuple[str, Any]]] | Default: NoneOptional options used to create the body index. Eg. body_index_options = [cassio.table.cql.STANDARD_ANALYZER] |
metadata_deny_list | Optional[list[str]] | Default: NoneOptional list of metadata keys to not index.
i.e. to fine-tune which of the metadata fields are indexed.
Note: if you plan to have massive unique text metadata entries,
consider not indexing them for performance
(and to overcome max-length limitations).
Note: the |