Neptune Open Cypher QA Chain
This QA chain queries Neptune graph database using openCypher and returns human readable response
from langchain.graphs.neptune_graph import NeptuneGraph
host = "<neptune-host>"
port = 80
use_https = False
graph = NeptuneGraph(host=host, port=port, use_https=use_https)
API Reference:
- NeptuneGraph from
langchain.graphs.neptune_graph
from langchain.chat_models import ChatOpenAI
from langchain.chains.graph_qa.neptune_cypher import NeptuneOpenCypherQAChain
llm = ChatOpenAI(temperature=0, model="gpt-4")
chain = NeptuneOpenCypherQAChain.from_llm(llm=llm, graph=graph)
chain.run("how many outgoing routes does the Austin airport have?")
API Reference:
- ChatOpenAI from
langchain.chat_models
- NeptuneOpenCypherQAChain from
langchain.chains.graph_qa.neptune_cypher