Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions libs/langchain/langchain/graphs/falkordb_graph.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, List
from typing import Any, Dict, List, Optional

from langchain.graphs.graph_document import GraphDocument
from langchain.graphs.graph_store import GraphStore
Expand Down Expand Up @@ -48,7 +48,13 @@ class FalkorDBGraph(GraphStore):
"""

def __init__(
self, database: str, host: str = "localhost", port: int = 6379
self,
database: str,
host: str = "localhost",
port: int = 6379,
username: Optional[str] = None,
password: Optional[str] = None,
ssl: bool = False,
) -> None:
"""Create a new FalkorDB graph wrapper instance."""
try:
Expand All @@ -60,7 +66,9 @@ def __init__(
"Please install it with `pip install redis`."
)

self._driver = redis.Redis(host=host, port=port)
self._driver = redis.Redis(
host=host, port=port, username=username, password=password, ssl=ssl
)
self._graph = Graph(self._driver, database)
self.schema: str = ""
self.structured_schema: Dict[str, Any] = {}
Expand Down