How to get distinct x number of threads with metadata filtering, so ai agent can show all threads in the sidebar
since mongodb checkpointer updated, on how metadata stored, this migration created some breaking changes. do we have any interface which can handle both of these type of docs
old_format_match = {
"metadata.user_id": user_id_binary,
"metadata.assistant_id": assistant_id_binary,
}
new_format_match = {
"metadata.user_id": {"$type": "array"},
"metadata.assistant_id": {"$type": "array"},
}