False otherwise, None if not implemented.
Return type
Optional[bool]
classmethod from_documents(documents: List[Document], embedding: Embeddings, distance_strategy: DistanceStrategy = DistanceStrategy.COSINE, ids: Optional[List[str]] = None, **kwargs: Any) → Neo4jVector[source]¶
Return Neo4jVector initialized from documents and embeddings.
Neo4j credentials are required in the form of url, username,
and password and optional database parameters.
classmethod from_embeddings(text_embeddings: List[Tuple[str, List[float]]], embedding: Embeddings, metadatas: Optional[List[dict]] = None, distance_strategy: DistanceStrategy = DistanceStrategy.COSINE, ids: Optional[List[str]] = None, pre_delete_collection: bool = False, **kwargs: Any) → Neo4jVector[source]¶
Construct Neo4jVector wrapper from raw documents and pre-
generated embeddings.
Return Neo4jVector initialized from documents and embeddings.
Neo4j credentials are required in the form of url, username,
and password and optional database parameters.
Example
from langchain_community.vectorstores.neo4j_vector import Neo4jVector
from langchain_community.embeddings import OpenAIEmbeddings
embeddings = OpenAIEmbeddings()
text_embeddings = embeddings.embed_documents(texts)
text_embedding_pairs = list(zip(texts, text_embeddings))
vectorstore = Neo4jVector.from_embeddings(
    text_embedding_pairs, embeddings)
classmethod from_existing_graph(embedding: Embeddings, node_label: str, embedding_node_property: str, text_node_properties: List[str], *, keyword_index_name: Optional[str] = 'keyword', index_name: str = 'vector', search_type: SearchType = SearchType.VECTOR, retrieval_query: str = '', **kwargs: Any) → Neo4jVector[source]¶