ym88659208ym87991671
Neptune Open Cypher QA Chain | Документация для разработчиков

Neptune Open Cypher QA Chain

Обновлено 24 мая 2024

This QA chain queries Neptune graph database using openCypher and returns human readable response

from langchain_community.graphs import NeptuneGraph

host = "<neptune-host>"
port = 8182
use_https = True

graph = NeptuneGraph(host=host, port=port, use_https=use_https)
from langchain.chains import NeptuneOpenCypherQAChain
from langchain_openai import ChatOpenAI

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?")
    'The Austin airport has 98 outgoing routes.'
ПАО Сбербанк использует cookie для персонализации сервисов и удобства пользователей.
Вы можете запретить сохранение cookie в настройках своего браузера.