Add support for neo4j database (#2644)

This commit is contained in:
Tomaz Bratanic
2025-05-07 19:54:18 +02:00
committed by GitHub
parent 73d9ccac69
commit c01221d4aa
2 changed files with 3 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ class Neo4jConfig(BaseModel):
url: Optional[str] = Field(None, description="Host address for the graph database")
username: Optional[str] = Field(None, description="Username for the graph database")
password: Optional[str] = Field(None, description="Password for the graph database")
database: Optional[str] = Field(None, description="Database for the graph database")
@model_validator(mode="before")
def check_host_port_or_path(cls, values):

View File

@@ -33,8 +33,9 @@ class MemoryGraph:
self.config.graph_store.config.url,
self.config.graph_store.config.username,
self.config.graph_store.config.password,
self.config.graph_store.config.database,
refresh_schema=False,
driver_config={"notifications_min_severity":"OFF"}
driver_config={"notifications_min_severity":"OFF"},
)
self.embedding_model = EmbedderFactory.create(
self.config.embedder.provider, self.config.embedder.config, self.config.vector_store.config