Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
hinthornw committed Oct 8, 2024
1 parent 16a06a0 commit 77610dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/chatbot/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ async def schedule_memories(state: ChatState, config: RunnableConfig) -> None:
# that run will be canceled, and a **new** one will be scheduled once
# this node is executed again.
thread_id=config["configurable"]["thread_id"],
# Rollback & cancel any scheduled runs for the target thread
# that haven't completed
# This memory-formation run will be enqueued and run later
# If a new run comes in before it is scheduled, it will be cancelled,
# then when this node is executed again, a *new* run will be scheduled
multitask_strategy="enqueue",
# This lets us "debounce" repeated requests to the memory graph
# if the user is actively engaging in a conversation. This saves us $$ and
Expand Down
2 changes: 1 addition & 1 deletion src/memory_graph/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def handle_patch_memory(

# Fetch existing memories from the store for this (patch) memory schema
existing_item = await store.aget(namespace, "memory")
existing = {existing_item.key: existing_item.value} if existing_item else None
existing = {state.function_name: existing_item.value} if existing_item else None

# Get the configuration for this memory schema (identified by function_name)
memory_config = next(
Expand Down

0 comments on commit 77610dd

Please sign in to comment.