mirror of
https://github.com/hwchase17/langchain.git
synced 2025-04-28 03:51:50 +00:00
Thank you for contributing to LangChain! **Description:** Since we just implemented [langchain-memgraph](https://pypi.org/project/langchain-memgraph/) integration, we are adding basic docs to [your site based on this comment](https://github.com/langchain-ai/langchain/pull/30197#pullrequestreview-2671616410) from @ccurme . **Twitter handle:** [@memgraphdb](https://x.com/memgraphdb) - [x] **Add tests and docs**: If you're adding a new integration, please include 1. a test for the integration, preferably unit tests that do not rely on network access, 2. an example notebook showing its use. It lives in `docs/docs/integrations` directory. - [x] **Lint and test**: Run `make format`, `make lint` and `make test` from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/ Additional guidelines: - Make sure optional dependencies are imported within a function. - Please do not add dependencies to pyproject.toml files (even optional ones) unless they are required for unit tests. - Most PRs should not touch more than one package. - Changes should be backwards compatible. - If you are adding something to community, do not re-import it in langchain. If no one reviews your PR within a few days, please @-mention one of baskaryan, eyurtsev, ccurme, vbarda, hwchase17. --------- Co-authored-by: Chester Curme <chester.curme@gmail.com>
41 lines
1.3 KiB
Plaintext
41 lines
1.3 KiB
Plaintext
# Memgraph
|
|
|
|
>Memgraph is a high-performance, in-memory graph database that is optimized for real-time queries and analytics.
|
|
>Get started with Memgraph by visiting [their website](https://memgraph.com/).
|
|
|
|
## Installation and Setup
|
|
|
|
- Install the Python SDK with `pip install langchain-memgraph`
|
|
|
|
## MemgraphQAChain
|
|
|
|
There exists a wrapper around Memgraph graph database that allows you to generate Cypher statements based on the user input
|
|
and use them to retrieve relevant information from the database.
|
|
|
|
```python
|
|
from langchain_memgraph.chains.graph_qa import MemgraphQAChain
|
|
from langchain_memgraph.graphs.memgraph import Memgraph
|
|
```
|
|
|
|
See a [usage example](/docs/integrations/graphs/memgraph)
|
|
|
|
## Constructing a Knowledge Graph from unstructured data
|
|
|
|
You can use the integration to construct a knowledge graph from unstructured data.
|
|
|
|
```python
|
|
from langchain_memgraph.graphs.memgraph import Memgraph
|
|
from langchain_experimental.graph_transformers import LLMGraphTransformer
|
|
```
|
|
|
|
See a [usage example](/docs/integrations/graphs/memgraph)
|
|
|
|
## Memgraph Tools and Toolkit
|
|
|
|
Memgraph also provides a toolkit that allows you to interact with the Memgraph database.
|
|
See a [usage example](/docs/integrations/tools/memgraph).
|
|
|
|
```python
|
|
from langchain_memgraph import MemgraphToolkit
|
|
```
|