mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-10 03:28:14 +00:00
fix(agent-framework): give each add_memory call its own document
Clarified memory handling by removing custom_id in memory addition.
This commit is contained in:
parent
bce2d0dc16
commit
f4245fdad2
1 changed files with 3 additions and 1 deletions
|
|
@ -130,10 +130,12 @@ class SupermemoryTools:
|
|||
) -> str:
|
||||
"""Add (remember) memories/details/information about the user or other facts or entities. Run when explicitly asked or when the user mentions any information generalizable beyond the context of the current conversation."""
|
||||
try:
|
||||
# No custom_id: each remembered fact is its own document. A shared id would
|
||||
# make every call update one document, replacing the previous memory and
|
||||
# colliding with the conversation transcript saved under connection.custom_id.
|
||||
response = await self._client.add(
|
||||
content=memory,
|
||||
container_tag=self._connection.container_tag,
|
||||
custom_id=self._connection.custom_id,
|
||||
)
|
||||
result: MemoryAddResult = {
|
||||
"success": True,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue