Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update integration tests with correct embedding generation #249

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions tests/test_graphiti_int.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,35 @@ async def test_graph_integration():
source_description='conversation message',
content='Alice likes Bob',
entity_edges=[],
group_id='test_graphiti_group',
)

alice_node = EntityNode(
name='Alice',
labels=[],
created_at=now,
summary='Alice summary',
group_id='test_graphiti_group',
)
await alice_node.generate_name_embedding(embedder)

bob_node = EntityNode(name='Bob', labels=[], created_at=now, summary='Bob summary')
bob_node = EntityNode(
name='Bob', labels=[], created_at=now, summary='Bob summary', group_id='test_graphiti_group'
)
await bob_node.generate_name_embedding(embedder)

episodic_edge_1 = EpisodicEdge(
source_node_uuid=episode.uuid, target_node_uuid=alice_node.uuid, created_at=now
source_node_uuid=episode.uuid,
target_node_uuid=alice_node.uuid,
created_at=now,
group_id='test_graphiti_group',
)

episodic_edge_2 = EpisodicEdge(
source_node_uuid=episode.uuid, target_node_uuid=bob_node.uuid, created_at=now
source_node_uuid=episode.uuid,
target_node_uuid=bob_node.uuid,
created_at=now,
group_id='test_graphiti_group',
)

entity_edge = EntityEdge(
Expand All @@ -129,6 +141,7 @@ async def test_graph_integration():
expired_at=now,
valid_at=now,
invalid_at=now,
group_id='test_graphiti_group',
)

await entity_edge.generate_embedding(embedder)
Expand Down
Loading