Graphiti的安装配置过程分为三个主要阶段:
environmental preparation
- Python 3.7+运行环境
- Neo4j Desktop(建议4.4+版本)
- 在Neo4j中创建本地DBMS实例并启动服务
Installation steps
- 通过pip安装核心库:
pip install graphiti_core
- Verify the installation:
python -c "import graphiti_core; print(graphiti_core.__version__)"
初始化方法
from graphiti_core import Graphiti from graphiti_core.nodes import EpisodeType # 基础初始化 graph = Graphiti() # 带配置的初始化 graph = Graphiti( neo4j_uri="bolt://localhost:7687", neo4j_auth=("username", "password") )
特别注意:使用时间感知功能时需要显式定义EpisodeType
类型节点,这是处理时间维度数据的特殊节点类型。
This answer comes from the articleGraphiti: dynamic knowledge graph construction and query tool (time-aware long memory scheme)The