How to incrementally update memories on an on-going conversation?
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?
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.