Skip to content

Commit

Permalink
feat: Add group id support to service
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-paliychuk committed Sep 6, 2024
1 parent 42fb590 commit 107763c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "graphiti-core"
version = "0.2.2"
version = "0.2.3"
description = "A temporal graph building library"
authors = [
"Paul Paliychuk <paul@getzep.com>",
Expand Down
2 changes: 1 addition & 1 deletion server/graph_service/routers/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ async def add_messages(
graphiti: ZepGraphitiDep,
):
async def add_messages_task(m: Message):
# Will pass a group_id to the add_episode call once it is implemented
await graphiti.add_episode(
group_id=request.group_id,
name=m.name,
episode_body=f"{m.role or ''}({m.role_type}): {m.content}",
reference_time=m.timestamp,
Expand Down
2 changes: 2 additions & 0 deletions server/graph_service/routers/retrieve.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ async def search(query: SearchQuery, graphiti: ZepGraphitiDep):
if user_node:
center_node_uuid = user_node.uuid
relevant_edges = await graphiti.search(
group_ids=[query.group_id],
query=query.query,
num_results=query.max_facts,
center_node_uuid=center_node_uuid,
Expand All @@ -37,6 +38,7 @@ async def get_memory(
):
combined_query = compose_query_from_messages(request.messages)
result = await graphiti.search(
group_ids=[request.group_id],
query=combined_query,
num_results=request.max_facts,
)
Expand Down

0 comments on commit 107763c

Please sign in to comment.