Update graph doc for installation (#1959)
This commit is contained in:
@@ -7,6 +7,16 @@ Mem0 now supports **Graph Memory**.
|
|||||||
With Graph Memory, users can now create and utilize complex relationships between pieces of information, allowing for more nuanced and context-aware responses.
|
With Graph Memory, users can now create and utilize complex relationships between pieces of information, allowing for more nuanced and context-aware responses.
|
||||||
This integration enables users to leverage the strengths of both vector-based and graph-based approaches, resulting in more accurate and comprehensive information retrieval and generation.
|
This integration enables users to leverage the strengths of both vector-based and graph-based approaches, resulting in more accurate and comprehensive information retrieval and generation.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
To use Mem0 with Graph Memory support, install it using pip:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip install mem0ai[graph]
|
||||||
|
```
|
||||||
|
|
||||||
|
This command installs Mem0 along with the necessary dependencies for graph functionality.
|
||||||
|
|
||||||
Try Graph Memory on Google Colab.
|
Try Graph Memory on Google Colab.
|
||||||
<a target="_blank" href="https://colab.research.google.com/drive/1PfIGVHnliIlG2v8cx0g45TF0US-jRPZ1?usp=sharing">
|
<a target="_blank" href="https://colab.research.google.com/drive/1PfIGVHnliIlG2v8cx0g45TF0US-jRPZ1?usp=sharing">
|
||||||
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
|
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from langchain_community.graphs import Neo4jGraph
|
try:
|
||||||
from rank_bm25 import BM25Okapi
|
from langchain_community.graphs import Neo4jGraph
|
||||||
|
except ImportError:
|
||||||
|
raise ImportError("langchain_community is not installed. Please install it using pip install langchain-community")
|
||||||
|
|
||||||
|
try:
|
||||||
|
from rank_bm25 import BM25Okapi
|
||||||
|
except ImportError:
|
||||||
|
raise ImportError("rank_bm25 is not installed. Please install it using pip install rank-bm25")
|
||||||
|
|
||||||
from mem0.graphs.tools import (
|
from mem0.graphs.tools import (
|
||||||
ADD_MEMORY_STRUCT_TOOL_GRAPH,
|
ADD_MEMORY_STRUCT_TOOL_GRAPH,
|
||||||
|
|||||||
Reference in New Issue
Block a user