feat(graphiti): Integrate Langfuse Tracer for enhanced monitoring and tracing of Graphiti operations

feat(graphiti): Define entity and edge types in new graphiti_schema for structured data extraction
feat(graphiti): Enhance ingest_episode_event_step with schema integration for improved episode processing
This commit is contained in:
bsiggel
2026-03-30 22:00:53 +00:00
parent e255ae1263
commit b4ff370823
4 changed files with 1238 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ from typing import Any
from motia import FlowContext, queue
from services.graphiti_client import get_graphiti, GraphitiError
from services.graphiti_schema import ENTITY_TYPES, EDGE_TYPES, EDGE_TYPE_MAP, EXTRACTION_INSTRUCTIONS
from graphiti_core.nodes import EpisodeType
@@ -81,6 +82,10 @@ async def handler(event_data: dict[str, Any], ctx: FlowContext[Any]) -> None:
reference_time=reference_time,
source=EpisodeType.text,
group_id=rag_akten_id,
entity_types=ENTITY_TYPES,
edge_types=EDGE_TYPES,
edge_type_map=EDGE_TYPE_MAP,
custom_extraction_instructions=EXTRACTION_INSTRUCTIONS,
)
episode_id = result.episode.uuid