mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-08 06:23:20 +00:00
ArangoDB/AQL support for Graph QA Chain (#7880)
**Description**: Serves as an introduction to LangChain's support for [ArangoDB](https://github.com/arangodb/arangodb), similar to https://github.com/hwchase17/langchain/pull/7165 and https://github.com/hwchase17/langchain/pull/4881 **Issue**: No issue has been created for this feature **Dependencies**: `python-arango` has been added as an optional dependency via the `CONTRIBUTING.md` guidelines **Twitter handle**: [at]arangodb - Integration test has been added - Notebook has been added: [graph_arangodb_qa.ipynb](https://github.com/amahanna/langchain/blob/master/docs/extras/modules/chains/additional/graph_arangodb_qa.ipynb) [](https://colab.research.google.com/github/amahanna/langchain/blob/master/docs/extras/modules/chains/additional/graph_arangodb_qa.ipynb) ``` docker run -p 8529:8529 -e ARANGO_ROOT_PASSWORD= arangodb/arangodb ``` ``` pip install git+https://github.com/amahanna/langchain.git ``` ```python from arango import ArangoClient from langchain.chat_models import ChatOpenAI from langchain.graphs import ArangoGraph from langchain.chains import ArangoGraphQAChain db = ArangoClient(hosts="localhost:8529").db(name="_system", username="root", password="", verify=True) graph = ArangoGraph(db) chain = ArangoGraphQAChain.from_llm(ChatOpenAI(temperature=0), graph=graph) chain.run("Is Ned Stark alive?") ``` --------- Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
23
docs/extras/integrations/providers/arangodb.mdx
Normal file
23
docs/extras/integrations/providers/arangodb.mdx
Normal file
@@ -0,0 +1,23 @@
|
||||
# ArangoDB
|
||||
|
||||
>[ArangoDB](https://github.com/arangodb/arangodb) is a scalable graph database system to drive value from connected data, faster. Native graphs, an integrated search engine, and JSON support, via a single query language. ArangoDB runs on-prem, in the cloud – anywhere.
|
||||
|
||||
## Dependencies
|
||||
|
||||
Install the [ArangoDB Python Driver](https://github.com/ArangoDB-Community/python-arango) package with
|
||||
```bash
|
||||
pip install python-arango
|
||||
```
|
||||
|
||||
## Graph QA Chain
|
||||
|
||||
Connect your ArangoDB Database with a Chat Model to get insights on your data.
|
||||
|
||||
See the notebook example [here](/docs/modules/chains/additional/graph_arangodb_qa.html).
|
||||
|
||||
```python
|
||||
from arango import ArangoClient
|
||||
|
||||
from langchain.graphs import ArangoGraph
|
||||
from langchain.chains import ArangoGraphQAChain
|
||||
```
|
Reference in New Issue
Block a user