langchain.graphs.neptune_graph.NeptuneGraph¶
class langchain.graphs.neptune_graph.NeptuneGraph(host: str, port: int = 8182, use_https: bool = True, client: Any = None, credentials_profile_name: Optional[str] = None, region_name: Optional[str] = None, service: str = 'neptunedata')[source]¶
Neptune wrapper for graph operations.
Parameters
host – endpoint for the database instance
port – port number for the database instance, default is 8182
use_https – whether to use secure connection, default is True
client – optional boto3 Neptune client
credentials_profile_name – optional AWS profile name
region_name – optional AWS region, e.g., us-west-2
service – optional service name, default is neptunedata
Example
graph = NeptuneGraph(host=’<my-cluster>’,
port=8182
)
Create a new Neptune graph wrapper instance.
Attributes
get_schema
Returns the schema of the Neptune database
Methods
__init__(host[, port, use_https, client, ...])
Create a new Neptune graph wrapper instance.
query(query[, params])
Query Neptune database.
__init__(host: str, port: int = 8182, use_https: bool = True, client: Any = None, credentials_profile_name: Optional[str] = None, region_name: Optional[str] = None, service: str = 'neptunedata') → None[source]¶
Create a new Neptune graph wrapper instance.
query(query: str, params: dict = {}) → Dict[str, Any][source]¶
Query Neptune database.
Examples using NeptuneGraph¶
Neptune Open Cypher QA Chain