Add support for neo4j database (#2644)
This commit is contained in:
@@ -9,6 +9,7 @@ class Neo4jConfig(BaseModel):
|
|||||||
url: Optional[str] = Field(None, description="Host address for the graph database")
|
url: Optional[str] = Field(None, description="Host address for the graph database")
|
||||||
username: Optional[str] = Field(None, description="Username 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")
|
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")
|
@model_validator(mode="before")
|
||||||
def check_host_port_or_path(cls, values):
|
def check_host_port_or_path(cls, values):
|
||||||
|
|||||||
@@ -33,8 +33,9 @@ class MemoryGraph:
|
|||||||
self.config.graph_store.config.url,
|
self.config.graph_store.config.url,
|
||||||
self.config.graph_store.config.username,
|
self.config.graph_store.config.username,
|
||||||
self.config.graph_store.config.password,
|
self.config.graph_store.config.password,
|
||||||
|
self.config.graph_store.config.database,
|
||||||
refresh_schema=False,
|
refresh_schema=False,
|
||||||
driver_config={"notifications_min_severity":"OFF"}
|
driver_config={"notifications_min_severity":"OFF"},
|
||||||
)
|
)
|
||||||
self.embedding_model = EmbedderFactory.create(
|
self.embedding_model = EmbedderFactory.create(
|
||||||
self.config.embedder.provider, self.config.embedder.config, self.config.vector_store.config
|
self.config.embedder.provider, self.config.embedder.config, self.config.vector_store.config
|
||||||
|
|||||||
Reference in New Issue
Block a user