fix: Properly use Graphiti API for entity types

- Remove invalid custom_node_types parameter from Graphiti initialization
- Pass entity_types to add_episode method instead of constructor
- Rename custom_types to entity_types in queue_service for clarity

The Graphiti API expects entity_types to be passed to add_episode methods, not the constructor.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Daniel Chalef 2025-08-26 20:35:26 -07:00
parent 5d40f2c5ce
commit 0621aee982
2 changed files with 4 additions and 5 deletions

View file

@ -165,7 +165,6 @@ class GraphitiService:
password=db_config['password'],
llm_client=llm_client,
embedder=embedder_client,
custom_node_types=custom_types,
max_coroutines=self.semaphore_limit,
)
@ -279,7 +278,7 @@ async def add_memory(
content=episode_body,
source_description=source_description,
episode_type=episode_type,
custom_types=graphiti_service.entity_types,
entity_types=graphiti_service.entity_types,
uuid=uuid,
)

View file

@ -104,7 +104,7 @@ class QueueService:
content: str,
source_description: str,
episode_type: Any,
custom_types: Any,
entity_types: Any,
uuid: str,
) -> int:
"""Add an episode for processing.
@ -115,7 +115,7 @@ class QueueService:
content: Episode content
source_description: Description of the episode source
episode_type: Type of the episode
custom_types: Custom entity types
entity_types: Entity types for extraction
uuid: Episode UUID
Returns:
@ -137,7 +137,7 @@ class QueueService:
episode_type=episode_type,
group_id=group_id,
reference_time=None, # Let graphiti handle timing
custom_types=custom_types,
entity_types=entity_types,
uuid=uuid,
)