Fix: Missing app_id on Neptune Analytics client (#3278)

Signed-off-by: Andy Kwok <andy.kwok@improving.com>
This commit is contained in:
Andy Kwok
2025-08-23 08:36:19 -07:00
committed by GitHub
parent 76411e2591
commit 9337a873ec
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -42,6 +42,7 @@ class MemgraphConfig(BaseModel):
class NeptuneConfig(BaseModel):
app_id: Optional[str] = Field("Mem0", description="APP_ID for the connection")
endpoint: Optional[str] = (
Field(
None,
+4 -1
View File
@@ -4,6 +4,7 @@ from .base import NeptuneBase
try:
from langchain_aws import NeptuneAnalyticsGraph
from botocore.config import Config
except ImportError:
raise ImportError("langchain_aws is not installed. Please install it using 'make install_all'.")
@@ -16,9 +17,11 @@ class MemoryGraph(NeptuneBase):
self.graph = None
endpoint = self.config.graph_store.config.endpoint
app_id = self.config.graph_store.config.app_id
if endpoint and endpoint.startswith("neptune-graph://"):
graph_identifier = endpoint.replace("neptune-graph://", "")
self.graph = NeptuneAnalyticsGraph(graph_identifier)
self.graph = NeptuneAnalyticsGraph(graph_identifier = graph_identifier,
config = Config(user_agent_appid=app_id))
if not self.graph:
raise ValueError("Unable to create a Neptune client: missing 'endpoint' in config")