Summary
NeptuneDriver.__init__ never sets the base GraphDriver._database attribute, but Graphiti.add_episode reads self.driver._database (when mapping a group_id to a database):
# graphiti_core/graphiti.py (add_episode)
if group_id != self.driver._database:
self.driver = self.driver.clone(database=group_id)
So any add_episode call against Neptune raises:
AttributeError: 'NeptuneDriver' object has no attribute '_database'
Repro
Construct a Graphiti(graph_driver=NeptuneDriver(host="neptune-db://...", aoss_host="...")) and call add_episode(...). (Neo4jDriver/FalkorDriver both set self._database in __init__; Neptune does not.)
Fix
Neptune is a single graph with no named databases, so default _database to '', consistent with get_default_group_id(GraphProvider.NEPTUNE) returning ''. The inherited with_database()/clone() (shallow copy reusing the same Neptune client) then works unchanged.
Environment: graphiti-core 0.29.2, Amazon Neptune Serverless (neptune-db://) + OpenSearch Serverless.
PR: fixes this.
Summary
NeptuneDriver.__init__never sets the baseGraphDriver._databaseattribute, butGraphiti.add_episodereadsself.driver._database(when mapping agroup_idto a database):So any
add_episodecall against Neptune raises:Repro
Construct a
Graphiti(graph_driver=NeptuneDriver(host="neptune-db://...", aoss_host="..."))and calladd_episode(...). (Neo4jDriver/FalkorDriverboth setself._databasein__init__; Neptune does not.)Fix
Neptune is a single graph with no named databases, so default
_databaseto'', consistent withget_default_group_id(GraphProvider.NEPTUNE)returning''. The inheritedwith_database()/clone()(shallow copy reusing the same Neptune client) then works unchanged.Environment: graphiti-core 0.29.2, Amazon Neptune Serverless (
neptune-db://) + OpenSearch Serverless.PR: fixes this.