Skip to content

Using Neptune with LangChain

0

Hello, I am trying to use the NeptuneGraph integration provided by Langchain on Link to Docs


from langchain_community.graphs import NeptuneGraph

host = "<neptune-host>"

port = 8182

use_https = True


graph = NeptuneGraph(host=host, port=port, use_https=use_https)

I try passing the endpoint as host, but everytime the response is a timeout error. There isn't enough explanation on langchain's docs regarding what the issue might be also what am i actually supposed to pass as host in above code ???

Thanks, Nithin

1 Answer
1

I think the problem lies in the authentication process to Neptune. If you do not specify a client or credentials_profile_name, NeptuneGraph will execute boto3.Session() internally. I suspect that the correct credentials are not being read at this time, and that the connection to Neptune is not being made.

https://api.python.langchain.com/en/latest/graphs/langchain_community.graphs.neptune_graph.NeptuneGraph.html#langchain_community.graphs.neptune_graph.NeptuneGraph

If you are running on a local PC and have not set up your credentials, try the following.

https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html

EXPERT
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.