langchain.graphs.arangodb_graph.ArangoGraph¶
class langchain.graphs.arangodb_graph.ArangoGraph(db: Any)[source]¶
ArangoDB wrapper for graph operations.
Create a new ArangoDB graph wrapper instance.
Attributes
db
schema
Methods
__init__(db)
Create a new ArangoDB graph wrapper instance.
from_db_credentials([url, dbname, username, ...])
Convenience constructor that builds Arango DB from credentials.
generate_schema([sample_ratio])
Generates the schema of the ArangoDB Database and returns it User can specify a sample_ratio (0 to 1) to determine the ratio of documents/edges used (in relation to the Collection size) to render each Collection Schema.
query(query[, top_k])
Query the ArangoDB database.
set_db(db)
set_schema([schema])
Set the schema of the ArangoDB Database.
__init__(db: Any) → None[source]¶
Create a new ArangoDB graph wrapper instance.
classmethod from_db_credentials(url: Optional[str] = None, dbname: Optional[str] = None, username: Optional[str] = None, password: Optional[str] = None) → Any[source]¶
Convenience constructor that builds Arango DB from credentials.
Parameters
url – Arango DB url. Can be passed in as named arg or set as environment
var ARANGODB_URL. Defaults to “http://localhost:8529”.
dbname – Arango DB name. Can be passed in as named arg or set as
environment var ARANGODB_DBNAME. Defaults to “_system”.
username – Can be passed in as named arg or set as environment var
ARANGODB_USERNAME. Defaults to “root”.
password – Can be passed ni as named arg or set as environment var
ARANGODB_PASSWORD. Defaults to “”.