memU icon indicating copy to clipboard operation
memU copied to clipboard

How to incrementally update memories on an on-going conversation?

Open Luffy966 opened this issue 4 months ago • 1 comments

During an on-going conversation, the messages of it can be incrementally updated. An example is like:

# first round
messages = [
    {"role":"user", "content": "Hello!"},
    {"role":"assistant", "content": "Hi there, how can I help you today?"}
]

# second round
messages = [
    {"role":"user", "content": "Hello!"},
    {"role":"assistant", "content": "Hi there, how can I help you today?"},
    {"role":"user", "content": "I'm tired!"},
    {"role":"assistant", "content": "I'm sorry to hear that. What happens?"}
]

# ...

# n round

And it seems that each time calling client.memorize_conversation(conversation=messages, ...), it would create a new conversation_id instead of incrementally update the origin conversation.

The question is: how can we incrementally update memories and conversations? Or just pass full conversation history every time?

Luffy966 avatar Aug 27 '25 02:08 Luffy966

No, we do not support incrementally update. however, i would recommend you to read our blog(https://memu.pro/blog/memu-best-practice) to understand our usage scenarios. I think for the example you provided, you can directly pass these messages to llm as context.

lihanl avatar Aug 28 '25 00:08 lihanl